Stacked card designs are a versatile and visually appealing way to present information in a compact format. They offer a dynamic user experience by layering content in an easily navigable manner.
In this article, we will explore 10 stunning examples of stacked card designs that can inspire your next project. Each example showcases unique features and creative uses of this popular UI pattern.
CODE1
Here's the code:
CODETEXT1
CODE2
Here's the code:
CODETEXT2
CODE3
Here's the code:
CODETEXT3
CODE4
Here's the code:
CODETEXT4
CODE5
Here's the code:
CODETEXT5
Designers and developers, elevate your UI game with Subframe's drag-and-drop interface. Its intuitive, responsive canvas ensures pixel-perfect designs every time, making it a favorite among professionals.
Ready to transform your projects? Start for free and experience the magic of Subframe 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
Unlock the power of Subframe and design stunning UIs, including stacked cards, with unmatched efficiency. Our drag-and-drop interface ensures pixel-perfect results instantly.
Ready to elevate your projects? Start for free and begin creating right away!
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Lumine - Minimalist Home Goods</title> <style> :root { --primary: #f8f9fa; --secondary: #212529; --accent: #4361ee; --light-gray: #e9ecef; --medium-gray: #adb5bd; --card-radius: 12px; --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, sans-serif; } body { background-color: var(--primary); color: var(--secondary); padding: 2rem 1rem; width: 100%; height: 100vh; display: flex; flex-direction: column; align-items: center; overflow-x: hidden; } .container { max-width: 100%; width: 100%; margin: 0 auto; } header { text-align: center; margin-bottom: 2.5rem; } h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.025em; margin-bottom: 0.75rem; } .subtitle { font-size: 0.95rem; color: var(--medium-gray); max-width: 90%; margin: 0 auto; line-height: 1.6; } .filter-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; padding: 0 0.5rem; } .filter-text { font-size: 0.85rem; color: var(--medium-gray); } .view-options { display: flex; gap: 0.75rem; } .view-btn { background: none; border: none; cursor: pointer; color: var(--medium-gray); transition: var(--transition); } .view-btn.active { color: var(--secondary); } .view-btn:hover { color: var(--accent); } .cards-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; position: relative; } .product-card { background-color: white; border-radius: var(--card-radius); overflow: hidden; position: relative; height: 400px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); transition: var(--transition); transform-origin: center; cursor: pointer; } .product-card:hover { box-shadow: 0 12px 24px rgba(0,0,0,0.1); transform: translateY(-5px); z-index: 10; } .card-image { height: 60%; width: 100%; position: relative; overflow: hidden; background-color: var(--light-gray); } .card-image img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); } .product-card:hover .card-image img { transform: scale(1.1); } .card-badge { position: absolute; top: 1rem; left: 1rem; background-color: var(--accent); color: white; padding: 0.25rem 0.75rem; border-radius: 30px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0; transform: translateY(-5px); transition: var(--transition); } .product-card:hover .card-badge { opacity: 1; transform: translateY(0); } .card-content { padding: 1.25rem; height: 40%; display: flex; flex-direction: column; } .card-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; } .card-price { font-size: 1.1rem; font-weight: 700; color: var(--accent); margin-bottom: 0.5rem; } .card-description { font-size: 0.85rem; color: var(--medium-gray); line-height: 1.5; margin-bottom: 1rem; flex-grow: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .card-meta { display: flex; justify-content: space-between; align-items: center; } .card-rating { display: flex; align-items: center; gap: 0.25rem; } .stars { color: #ffd700; font-size: 0.8rem; } .rating-count { font-size: 0.75rem; color: var(--medium-gray); } .wishlist-btn { background: none; border: none; color: var(--medium-gray); cursor: pointer; transition: var(--transition); } .wishlist-btn:hover, .wishlist-btn.active { color: #e63946; transform: scale(1.2); } .card-overlay { position: absolute; bottom: 0; left: 0; right: 0; background-color: white; padding: 1.25rem; transform: translateY(100%); transition: var(--transition); border-top: 1px solid var(--light-gray); box-shadow: 0 -5px 20px rgba(0,0,0,0.05); } .product-card:hover .card-overlay { transform: translateY(0); } .overlay-title { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--medium-gray); margin-bottom: 0.75rem; } .color-options { display: flex; gap: 0.5rem; margin-bottom: 1rem; } .color-option { width: 20px; height: 20px; border-radius: 50%; cursor: pointer; position: relative; transition: var(--transition); } .color-option:hover { transform: scale(1.2); } .color-option.selected::after { content: ''; position: absolute; top: -3px; left: -3px; right: -3px; bottom: -3px; border: 1px solid var(--medium-gray); border-radius: 50%; } .add-to-cart { width: 100%; padding: 0.75rem; background-color: var(--secondary); color: white; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; transition: var(--transition); display: flex; justify-content: center; align-items: center; gap: 0.5rem; } .add-to-cart:hover { background-color: var(--accent); } .add-to-cart .icon { font-size: 1rem; } /* Animation */ @keyframes cardReveal { 0% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: translateY(0); } } .product-card { animation: cardReveal 0.5s forwards; } .product-card:nth-child(2) { animation-delay: 0.1s; } .product-card:nth-child(3) { animation-delay: 0.2s; } .product-card:nth-child(4) { animation-delay: 0.3s; } /* Responsive */ @media (max-width: 700px) { .cards-container { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; } .product-card { height: 380px; } h1 { font-size: 1.5rem; } .subtitle { font-size: 0.85rem; } } @media (max-width: 500px) { .cards-container { grid-template-columns: 1fr; } .product-card { height: 350px; } h1 { font-size: 1.25rem; } } </style> </head> <body> <div class="container"> <header> <h1>Lumine Collection</h1> <p class="subtitle">Effortlessly elevate your space with our carefully curated minimalist home essentials.</p> </header> <div class="filter-bar"> <span class="filter-text">4 products</span> <div class="view-options"> <button class="view-btn active" id="grid-view"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> <path d="M1 2.5A1.5 1.5 0 0 1 2.5 1h3A1.5 1.5 0 0 1 7 2.5v3A1.5 1.5 0 0 1 5.5 7h-3A1.5 1.5 0 0 1 1 5.5v-3zm8 0A1.5 1.5 0 0 1 10.5 1h3A1.5 1.5 0 0 1 15 2.5v3A1.5 1.5 0 0 1 13.5 7h-3A1.5 1.5 0 0 1 9 5.5v-3zm-8 8A1.5 1.5 0 0 1 2.5 9h3A1.5 1.5 0 0 1 7 10.5v3A1.5 1.5 0 0 1 5.5 15h-3A1.5 1.5 0 0 1 1 13.5v-3zm8 0A1.5 1.5 0 0 1 10.5 9h3a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-3A1.5 1.5 0 0 1 9 13.5v-3z"/> </svg> </button> <button class="view-btn" id="list-view"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> <path fill-rule="evenodd" d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5z"/> </svg> </button> </div> </div> <div class="cards-container"> <!-- Card 1 --> <div class="product-card"> <div class="card-image"> <img src="https://images.unsplash.com/photo-1503602642458-232111445657?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1000&q=80" alt="Ceramic Bowl Set"> <div class="card-badge">New arrival</div> </div> <div class="card-content"> <h3 class="card-title">Ceramic Bowl Set</h3> <p class="card-price">$48.00</p> <p class="card-description">Handcrafted ceramic bowl set with organic shapes and a matte finish. Perfect for everyday use.</p> <div class="card-meta"> <div class="card-rating"> <div class="stars">★★★★★</div> <span class="rating-count">(27)</span> </div> <button class="wishlist-btn"> <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> </div> </div> <div class="card-overlay"> <p class="overlay-title">Choose color</p> <div class="color-options"> <div class="color-option selected" style="background-color: #e5e5e5;"></div> <div class="color-option" style="background-color: #d0c8b5;"></div> <div class="color-option" style="background-color: #94a7ae;"></div> </div> <button class="add-to-cart"> <span class="icon"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> <path d="M0 1.5A.5.5 0 0 1 .5 1H2a.5.5 0 0 1 .485.379L2.89 3H14.5a.5.5 0 0 1 .491.592l-1.5 8A.5.5 0 0 1 13 12H4a.5.5 0 0 1-.491-.408L2.01 3.607 1.61 2H.5a.5.5 0 0 1-.5-.5zM3.102 4l1.313 7h8.17l1.313-7H3.102zM5 12a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm7 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm-7 1a1 1 0 1 1 0 2 1 1 0 0 1 0-2zm7 0a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"/> </svg> </span> Add to cart </button> </div> </div> <!-- Card 2 --> <div class="product-card"> <div class="card-image"> <img src="https://images.unsplash.com/photo-1609798254519-199bcce47c1b?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1000&q=80" alt="Sculptural Vase"> <div class="card-badge">Bestseller</div> </div> <div class="card-content"> <h3 class="card-title">Sculptural Vase</h3> <p class="card-price">$62.00</p> <p class="card-description">Modern ceramic vase with an asymmetrical design. Doubles as a sculptural art piece when not in use.</p> <div class="card-meta"> <div class="card-rating"> <div class="stars">★★★★☆</div> <span class="rating-count">(19)</span> </div> <button class="wishlist-btn active"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> <path fill-rule="evenodd" d="M8 1.314C12.438-3.248 23.534 4.735 8 15-7.534 4.736 3.562-3.248 8 1.314z"/> </svg> </button> </div> </div> <div class="card-overlay"> <p class="overlay-title">Choose color</p> <div class="color-options"> <div class="color-option selected" style="background-color: #e5e5e5;"></div> <div class="color-option" style="background-color: #cba5a5;"></div> <div class="color-option" style="background-color: #212529;"></div> </div> <button class="add-to-cart"> <span class="icon"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> <path d="M0 1.5A.5.5 0 0 1 .5 1H2a.5.5 0 0 1 .485.379L2.89 3H14.5a.5.5 0 0 1 .491.592l-1.5 8A.5.5 0 0 1 13 12H4a.5.5 0 0 1-.491-.408L2.01 3.607 1.61 2H.5a.5.5 0 0 1-.5-.5zM3.102 4l1.313 7h8.17l1.313-7H3.102zM5 12a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm7 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm-7 1a1 1 0 1 1 0 2 1 1 0 0 1 0-2zm7 0a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"/> </svg> </span> Add to cart </button> </div> </div> <!-- Card 3 --> <div class="product-card"> <div class="card-image"> <img src="https://images.unsplash.com/photo-1543512214-318c7553f230?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1000&q=80" alt="Linen Throw Pillow"> <div class="card-badge">Limited</div> </div> <div class="card-content"> <h3 class="card-title">Linen Throw Pillow</h3> <p class="card-price">$38.00</p> <p class="card-description">Soft, washed linen pillow covers in muted tones. Sustainably made from natural fibers.</p> <div class="card-meta"> <div class="card-rating"> <div class="stars">★★★★★</div> <span class="rating-count">(42)</span> </div> <button class="wishlist-btn"> <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> </div> </div> <div class="card-overlay"> <p class="overlay-title">Choose color</p> <div class="color-options"> <div class="color-option selected" style="background-color: #d0c8b5;"></div> <div class="color-option" style="background-color: #a9a9a9;"></div> <div class="color-option" style="background-color: #7d8491;"></div> </div> <button class="add-to-cart"> <span class="icon"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> <path d="M0 1.5A.5.5 0 0 1 .5 1H2a.5.5 0 0 1 .485.379L2.89 3H14.5a.5.5 0 0 1 .491.592l-1.5 8A.5.5 0 0 1 13 12H4a.5.5 0 0 1-.491-.408L2.01 3.607 1.61 2H.5a.5.5 0 0 1-.5-.5zM3.102 4l1.313 7h8.17l1.313-7H3.102zM5 12a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm7 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm-7 1a1 1 0 1 1 0 2 1 1 0 0 1 0-2zm7 0a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"/> </svg> </span> Add to cart </button> </div> </div> <!-- Card 4 --> <div class="product-card"> <div class="card-image"> <img src="https://images.unsplash.com/photo-1522771739844-6a9f6d5f14af?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1000&q=80" alt="Concrete Table Lamp"> <div class="card-badge">Eco-friendly</div> </div> <div class="card-content"> <h3 class="card-title">Concrete Table Lamp</h3> <p class="card-price">$89.00</p> <p class="card-description">Minimalist table lamp with a polished concrete base and linen shade. Adds warm, ambient lighting.</p> <div class="card-meta"> <div class="card-rating"> <div class="stars">★★★★☆</div> <span class="rating-count">(15)</span> </div> <button class="wishlist-btn"> <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> </div> </div> <div class="card-overlay"> <p class="overlay-title">Choose shade</p> <div class="color-options"> <div class="color-option selected" style="background-color: #f5f5f5;"></div> <div class="color-option" style="background-color: #d0c8b5;"></div> <div class="color-option" style="background-color: #333333;"></div> </div> <button class="add-to-cart"> <span class="icon"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> <path d="M0 1.5A.5.5 0 0 1 .5 1H2a.5.5 0 0 1 .485.379L2.89 3H14.5a.5.5 0 0 1 .491.592l-1.5 8A.5.5 0 0 1 13 12H4a.5.5 0 0 1-.491-.408L2.01 3.607 1.61 2H.5a.5.5 0 0 1-.5-.5zM3.102 4l1.313 7h8.17l1.313-7H3.102zM5 12a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm7 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm-7 1a1 1 0 1 1 0 2 1 1 0 0 1 0-2zm7 0a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"/> </svg> </span> Add to cart </button> </div> </div> </div> </div> <script> // View toggle functionality const gridView = document.getElementById('grid-view'); const listView = document.getElementById('list-view'); const cardsContainer = document.querySelector('.cards-container'); gridView.addEventListener('click', () => { gridView.classList.add('active'); listView.classList.remove('active'); cardsContainer.style.gridTemplateColumns = 'repeat(auto-fill, minmax(280px, 1fr))'; document.querySelectorAll('.product-card').forEach(card => { card.style.height = '400px'; card.querySelector('.card-image').style.height = '60%'; card.querySelector('.card-content').style.height = '40%'; }); }); listView.addEventListener('click', () => { listView.classList.add('active'); gridView.classList.remove('active'); cardsContainer.style.gridTemplateColumns = '1fr'; document.querySelectorAll('.product-card').forEach(card => { card.style.height = '180px'; card.querySelector('.card-image').style.height = '100%'; card.querySelector('.card-image').style.width = '30%'; card.querySelector('.card-image').style.float = 'left'; card.querySelector('.card-content').style.width = '70%'; card.querySelector('.card-content').style.float = 'right'; card.querySelector('.card-content').style.height = '100%'; // Reset back on window resize window.addEventListener('resize', () => { if (window.innerWidth <= 700 && listView.classList.contains('active')) { gridView.click(); } }); }); }); // Wishlist toggle document.querySelectorAll('.wishlist-btn').forEach(btn => { btn.addEventListener('click', (e) => { e.stopPropagation(); btn.classList.toggle('active'); if (btn.classList.contains('active')) { btn.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8 1.314C12.438-3.248 23.534 4.735 8 15-7.534 4.736 3.562-3.248 8 1.314z"/></svg>'; } else { btn.innerHTML = '<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>'; } }); }); // Color options selection document.querySelectorAll('.color-option').forEach(option => { option.addEventListener('click', (e) => { e.stopPropagation(); // Find all color options in this specific card const parentCard = option.closest('.card-overlay'); parentCard.querySelectorAll('.color-option').forEach(opt => { opt.classList.remove('selected'); }); option.classList.add('selected'); }); }); // Add to cart interaction document.querySelectorAll('.add-to-cart').forEach(btn => { btn.addEventListener('click', (e) => { e.stopPropagation(); const originalText = btn.innerHTML; btn.innerHTML = '<span class="icon">✓</span>Added to cart'; btn.style.backgroundColor = '#2ecc71'; setTimeout(() => { btn.innerHTML = originalText; btn.style.backgroundColor = ''; }, 1500); }); }); // Make cards responsive to window changes window.addEventListener('resize', () => { if (window.innerWidth <= 700) { document.querySelectorAll('.product-card').forEach(card => { card.style.height = '380px'; }); } else { document.querySelectorAll('.product-card').forEach(card => { card.style.height = '400px'; }); } if (window.innerWidth <= 500) { document.querySelectorAll('.product-card').forEach(card => { card.style.height = '350px'; }); } }); </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', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; } body { background-color: #f5f7fa; display: flex; justify-content: center; align-items: center; min-height: 700px; width: 100%; padding: 20px; overflow-x: hidden; } .dashboard { width: 100%; max-width: 650px; height: 660px; position: relative; overflow: hidden; border-radius: 30px; background: linear-gradient(135deg, #7367f0, #5e50ee); box-shadow: 0 15px 35px rgba(115, 103, 240, 0.25); padding: 25px; } .header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; color: white; } .profile { display: flex; align-items: center; } .profile-pic { width: 50px; height: 50px; border-radius: 50%; background: #ffffff; display: flex; justify-content: center; align-items: center; margin-right: 15px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); overflow: hidden; } .profile-pic img { width: 100%; height: 100%; object-fit: cover; } .greeting h1 { font-size: 22px; margin-bottom: 3px; } .greeting p { font-size: 14px; opacity: 0.8; } .notification { position: relative; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); display: flex; justify-content: center; align-items: center; cursor: pointer; transition: all 0.3s ease; } .notification:hover { transform: scale(1.1); background: rgba(255, 255, 255, 0.3); } .notification i { color: white; font-size: 18px; } .notification::after { content: ''; position: absolute; top: 8px; right: 8px; width: 10px; height: 10px; border-radius: 50%; background: #FF5A5F; border: 2px solid #7367f0; } .cards-container { position: relative; height: 520px; overflow: visible; perspective: 1000px; } .card { position: absolute; width: 100%; padding: 25px; border-radius: 25px; background: white; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08); transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); overflow: hidden; cursor: pointer; transform-origin: top center; z-index: 10; top: 0; } .card:nth-child(1) { z-index: 5; transform: translateY(0); } .card:nth-child(2) { z-index: 4; transform: translateY(20px) scale(0.98); } .card:nth-child(3) { z-index: 3; transform: translateY(40px) scale(0.96); } .card:nth-child(4) { z-index: 2; transform: translateY(60px) scale(0.94); } .card:nth-child(5) { z-index: 1; transform: translateY(80px) scale(0.92); } .card.expanded { height: 500px; transform: translateY(0) scale(1); z-index: 20; } .card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; } .card-title { display: flex; align-items: center; } .card-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; justify-content: center; align-items: center; margin-right: 12px; } .card-icon i { font-size: 20px; color: white; } .card-title h2 { font-size: 18px; color: #333; } .card-value { font-size: 16px; font-weight: 600; } .card-content { margin-top: 20px; max-height: 0; overflow: hidden; transition: max-height 0.5s ease-in-out; } .expanded .card-content { max-height: 400px; } .progress-bar { width: 100%; height: 8px; background-color: #f0f0f0; border-radius: 10px; margin: 15px 0; overflow: hidden; } .progress { height: 100%; border-radius: 10px; width: 0; transition: width 1.5s cubic-bezier(0.26, 0.86, 0.44, 0.98); } .chart-container { width: 100%; height: 200px; margin: 20px 0; } /* Card-specific styles */ .steps .card-icon { background-color: #7367f0; } .steps .progress { background-color: #7367f0; } .heart-rate .card-icon { background-color: #FF5A5F; } .heart-rate .progress { background-color: #FF5A5F; } .sleep .card-icon { background-color: #2EC4B6; } .sleep .progress { background-color: #2EC4B6; } .calories .card-icon { background-color: #FFBE0B; } .calories .progress { background-color: #FFBE0B; } .hydration .card-icon { background-color: #3BCEAC; } .hydration .progress { background-color: #3BCEAC; } .summary { display: flex; justify-content: space-between; margin-top: 20px; } .summary-item { text-align: center; flex: 1; } .summary-value { font-size: 18px; font-weight: 600; color: #333; } .summary-label { font-size: 12px; color: #888; margin-top: 5px; } .insights { margin-top: 25px; padding: 15px; border-radius: 15px; background-color: #f8f8f8; } .insights-title { font-size: 16px; color: #333; margin-bottom: 10px; } .insights-text { font-size: 14px; color: #666; line-height: 1.5; } .pulse-animation { animation: pulse 2s infinite; } @keyframes pulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.05); opacity: 0.8; } 100% { transform: scale(1); opacity: 1; } } .water-drop { position: relative; width: 40px; height: 40px; border-radius: 50% 50% 0 50%; background: #3BCEAC; transform: rotate(-45deg); margin: 20px auto; animation: wobble 3s infinite ease-in-out; } @keyframes wobble { 0%, 100% { transform: rotate(-45deg) scale(1); } 50% { transform: rotate(-45deg) scale(1.1); } } .heartbeat { position: relative; width: 100%; height: 60px; margin: 20px 0; } .heartbeat-line { position: absolute; width: 100%; height: 100%; top: 0; left: 0; overflow: hidden; } .heartbeat-line:before { content: ''; position: absolute; width: 100%; height: 100%; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='60' viewBox='0 0 400 60'%3E%3Cpath d='M0,30 L50,30 L60,10 L70,50 L80,10 L90,50 L100,30 L120,30 L130,0 L140,60 L150,30 L200,30 L210,10 L220,50 L230,10 L240,50 L250,30 L270,30 L280,0 L290,60 L300,30 L350,30 L360,10 L370,50 L380,10 L390,50 L400,30' fill='none' stroke='%23FF5A5F' stroke-width='2'/%3E%3C/svg%3E") repeat-x; animation: heartbeat 2s linear infinite; } @keyframes heartbeat { 0% { transform: translateX(0); } 100% { transform: translateX(-400px); } } /* Responsive tweaks */ @media (max-width: 480px) { .dashboard { padding: 15px; } .card { padding: 15px; } .greeting h1 { font-size: 18px; } .greeting p { font-size: 12px; } .card-title h2 { font-size: 16px; } .summary-value { font-size: 16px; } } /* Font Awesome integration */ .fas { display: inline-block; width: 1em; height: 1em; background-size: cover; background-repeat: no-repeat; background-position: center; } .fa-bell { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='white' d='M224 0c-17.7 0-32 14.3-32 32V49.9C119.5 61.4 64 124.2 64 200v33.4c0 45.4-15.5 89.5-43.8 124.9L5.3 377c-5.8 7.2-6.9 17.1-2.9 25.4S14.8 416 24 416H424c9.2 0 17.6-5.3 21.6-13.6s2.9-18.2-2.9-25.4l-14.9-18.6C399.5 322.9 384 278.8 384 233.4V200c0-75.8-55.5-138.6-128-150.1V32c0-17.7-14.3-32-32-32zm0 96h8c57.4 0 104 46.6 104 104v33.4c0 47.9 13.9 94.6 39.7 134.6H72.3C98.1 328 112 281.3 112 233.4V200c0-57.4 46.6-104 104-104h8zm64 352H224 160c0 17 6.7 33.3 18.7 45.3s28.3 18.7 45.3 18.7s33.3-6.7 45.3-18.7s18.7-28.3 18.7-45.3z'/%3E%3C/svg%3E"); } .fa-shoe-prints { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 512'%3E%3Cpath fill='white' d='M416 0C352.3 0 256 32 256 32V160c48 0 76 16 104 32s56 32 104 32c56.4 0 176-16 176-176S512 0 416 0zM128 96c0-53 208-32 208-32V352c-48 0-76-16-104-32s-56-32-104-32C67.6 288-64 304-64 464V512H64V464c0-38.7 54.7-95.4 128-96c3.7 0 7.3-.1 10.8-.3c-19.6-12.8-33.4-33.6-34.8-58.1V305C81.2 302.5-64 283.9-64 192C-64 66 18.7 96 128 96z'/%3E%3C/svg%3E"); } .fa-heartbeat { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='white' d='M228.3 469.1L47.6 300.4c-4.2-3.9-8.2-8.1-11.9-12.4h87c22.6 0 43-13.6 51.7-34.5l10.5-25.2 49.3 109.5c3.8 8.5 12.1 14 21.4 14.1s17.8-5 22-13.3L320 253.7l1.7 3.4c9.5 19 28.9 31 50.1 31H476.3c-3.7 4.3-7.7 8.5-11.9 12.4L283.7 469.1c-7.5 7-17.4 10.9-27.7 10.9s-20.2-3.9-27.7-10.9zM503.7 240h-132c-3 0-5.8-1.7-7.2-4.4l-23.2-46.3c-4.1-8.1-12.4-13.3-21.5-13.3s-17.4 5.1-21.5 13.3l-41.4 82.8L205.9 158.2c-3.9-8.7-12.7-14.3-22.2-14.1s-18.1 5.9-21.8 14.8l-31.8 76.3c-1.2 3-4.2 4.9-7.4 4.9H16c-2.6 0-5 .4-7.3 1.1C3 225.2 0 208.2 0 190.9v-5.8c0-69.9 50.5-129.5 119.4-141C165 36.5 211.4 51.4 244 84l12 12 12-12c32.6-32.6 79-47.5 124.6-39.9C461.5 55.6 512 115.2 512 185.1v5.8c0 16.9-2.8 33.5-8.3 49.1z'/%3E%3C/svg%3E"); } .fa-moon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath fill='white' d='M223.5 32C100 32 0 132.3 0 256S100 480 223.5 480c60.6 0 115.5-24.2 155.8-63.4c5-4.9 6.3-12.5 3.1-18.7s-10.1-9.7-17-8.5c-9.8 1.7-19.8 2.6-30.1 2.6c-96.9 0-175.5-78.8-175.5-176c0-65.8 36-123.1 89.3-153.3c6.1-3.5 9.2-10.5 7.7-17.3s-7.3-11.9-14.3-12.5c-6.3-.5-12.6-.8-19-.8z'/%3E%3C/svg%3E"); } .fa-fire { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='white' d='M159.3 5.4c7.8-7.3 19.9-7.2 27.7 .1c27.6 25.9 53.5 53.8 77.7 84c11-14.4 23.5-30.1 37-42.9c7.9-7.4 20.1-7.4 28 .1c34.6 33 63.9 76.6 84.5 118c20.3 40.8 33.8 82.5 33.8 111.9C448 404.2 348.2 512 224 512C98.4 512 0 404.1 0 276.5c0-38.4 17.8-85.3 45.4-131.7C73.3 97.7 112.7 48.6 159.3 5.4zM225.7 416c25.3 0 47.7-7 68.8-21c42.1-29.4 53.4-88.2 28.1-134.4c-4.5-9-16-9.6-22.5-2l-25.2 29.3c-6.6 7.6-18.5 7.4-24.7-.5c-16.5-21-46-58.5-62.8-79.8c-6.3-8-18.3-8.1-24.7-.1c-33.8 42.5-50.8 69.3-50.8 99.4C112 375.4 162.6 416 225.7 416z'/%3E%3C/svg%3E"); } .fa-tint { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath fill='white' d='M192 512C86 512 0 426 0 320C0 228.8 130.2 57.7 166.6 11.7C172.6 4.2 181.5 0 191.1 0h1.8c9.6 0 18.5 4.2 24.5 11.7C253.8 57.7 384 228.8 384 320c0 106-86 192-192 192zM96 336c0-8.8-7.2-16-16-16s-16 7.2-16 16c0 61.9 50.1 112 112 112c8.8 0 16-7.2 16-16s-7.2-16-16-16c-44.2 0-80-35.8-80-80z'/%3E%3C/svg%3E"); } .badges { display: flex; gap: 10px; margin-top: 20px; } .badge { background: #f5f7fa; border-radius: 20px; padding: 8px 12px; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 5px; color: #555; } .badge-icon { width: 18px; height: 18px; border-radius: 50%; display: flex; justify-content: center; align-items: center; } .badge-icon.positive { background: rgba(46, 196, 182, 0.2); color: #2EC4B6; } .badge-icon.negative { background: rgba(255, 90, 95, 0.2); color: #FF5A5F; } /* Interactive wave effect */ .wave-container { position: relative; height: 60px; margin-top: 15px; overflow: hidden; border-radius: 10px; } .wave { position: absolute; width: 100%; height: 50%; background: #3BCEAC; bottom: 0; } .wave:before, .wave:after { content: ""; position: absolute; width: 200%; height: 200%; top: 0; left: 0; transform: translate(-50%, -75%); } .wave:before { border-radius: 45%; background: rgba(59, 206, 172, 0.5); animation: wave 8s linear infinite; } .wave:after { border-radius: 40%; background: rgba(59, 206, 172, 0.3); animation: wave 15s linear infinite; } @keyframes wave { 0% { transform: translate(-50%, -75%) rotate(0deg); } 100% { transform: translate(-50%, -75%) rotate(360deg); } } .wave-level { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 18px; font-weight: bold; color: white; text-shadow: 0 1px 2px rgba(0,0,0,0.2); z-index: 2; } </style> </head> <body> <div class="dashboard"> <div class="header"> <div class="profile"> <div class="profile-pic"> <img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%237367f0' d='M399 384.2C376.9 345.8 335.4 320 288 320H224c-47.4 0-88.9 25.8-111 64.2c35.2 39.2 86.2 63.8 143 63.8s107.8-24.7 143-63.8zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256 16a72 72 0 1 0 0-144 72 72 0 1 0 0 144z'/%3E%3C/svg%3E" alt="Profile"> </div> <div class="greeting"> <h1>Hello, Sarah!</h1> <p>Wednesday, May 8</p> </div> </div> <div class="notification"> <i class="fas fa-bell"></i> </div> </div> <div class="cards-container"> <div class="card steps"> <div class="card-header"> <div class="card-title"> <div class="card-icon"> <i class="fas fa-shoe-prints"></i> </div> <h2>Daily Steps</h2> </div> <div class="card-value">8,745</div> </div> <div class="progress-bar"> <div class="progress" style="width: 87%;"></div> </div> <div class="card-content"> <div class="summary"> <div class="summary-item"> <div class="summary-value">8,745</div> <div class="summary-label">Today</div> </div> <div class="summary-item"> <div class="summary-value">10,000</div> <div class="summary-label">Goal</div> </div> <div class="summary-item"> <div class="summary-value">5.2</div> <div class="summary-label">Km</div> </div> <div class="summary-item"> <div class="summary-value">437</div> <div class="summary-label">Kcal</div> </div> </div> <div id="steps-chart" class="chart-container"></div> <div class="badges"> <div class="badge"> <div class="badge-icon positive">+</div> <span>32% from yesterday</span> </div> <div class="badge"> <div class="badge-icon positive">↑</div> <span>Active Streak: 5 days</span> </div> </div> <div class="insights"> <div class="insights-title">Activity Insights</div> <div class="insights-text">Your step count has been increasing steadily this week. Keep up the momentum to reach your 10,000 step goal!</div> </div> </div> </div> <div class="card heart-rate"> <div class="card-header"> <div class="card-title"> <div class="card-icon"> <i class="fas fa-heartbeat"></i> </div> <h2>Heart Rate</h2> </div> <div class="card-value">72 BPM</div> </div> <div class="progress-bar"> <div class="progress" style="width: 60%;"></div> </div> <div class="card-content"> <div class="heartbeat"></div> <div class="summary"> <div class="summary-item"> <div class="summary-value">72</div> <div class="summary-label">Current</div> </div> <div class="summary-item"> <div class="summary-value">65</div> <div class="summary-label">Resting</div> </div> <div class="summary-item"> <div class="summary-value">135</div> <div class="summary-label">Peak</div> </div> </div> <div id="heart-chart" class="chart-container"></div> <div class="badges"> <div class="badge"> <div class="badge-icon positive">✓</div> <span>Within normal range</span> </div> </div> <div class="insights"> <div class="insights-title">Heart Health Insights</div> <div class="insights-text">Your heart rate has been consistent. Your average resting heart rate indicates good cardiovascular fitness.</div> </div> </div> </div> <div class="card sleep"> <div class="card-header"> <div class="card-title"> <div class="card-icon"> <i class="fas fa-moon"></i> </div> <h2>Sleep Analysis</h2> </div> <div class="card-value">7h 12m</div> </div> <div class="progress-bar"> <div class="progress" style="width: 75%;"></div> </div> <div class="card-content"> <div class="summary"> <div class="summary-item"> <div class="summary-value">7h 12m</div> <div class="summary-label">Total</div> </div> <div class="summary-item"> <div class="summary-value">1h 32m</div> <div class="summary-label">Deep</div> </div> <div class="summary-item"> <div class="summary-value">3h 40m</div> <div class="summary-label">Light</div> </div> <div class="summary-item"> <div class="summary-value">2h 00m</div> <div class="summary-label">REM</div> </div> </div> <div id="sleep-chart" class="chart-container"></div> <div class="badges"> <div class="badge"> <div class="badge-icon negative">↓</div> <span>45m less than avg</span> </div> </div> <div class="insights"> <div class="insights-title">Sleep Quality Insights</div> <div class="insights-text">Your sleep duration was slightly below your weekly average. Deep sleep cycles were consistent, but consider going to bed 30 minutes earlier tonight.</div> </div> </div> </div> <div class="card calories"> <div class="card-header"> <div class="card-title"> <div class="card-icon"> <i class="fas fa-fire"></i> </div> <h2>Calories</h2> </div> <div class="card-value">1,845 / 2,200</div> </div> <div class="progress-bar"> <div class="progress" style="width: 83%;"></div> </div> <div class="card-content"> <div class="summary"> <div class="summary-item"> <div class="summary-value">1,845</div> <div class="summary-label">Consumed</div> </div> <div class="summary-item"> <div class="summary-value">2,200</div> <div class="summary-label">Daily Goal</div> </div> <div class="summary-item"> <div class="summary-value">637</div> <div class="summary-label">Burned</div> </div> </div> <div id="calories-chart" class="chart-container"></div> <div class="badges"> <div class="badge"> <div class="badge-icon positive">✓</div> <span>On track with goal</span> </div> </div> <div class="insights"> <div class="insights-title">Nutrition Insights</div> <div class="insights-text">Your protein intake is 20% higher than recommended. Consider balancing with more complex carbs for sustained energy throughout the day.</div> </div> </div> </div> <div class="card hydration"> <div class="card-header"> <div class="card-title"> <div class="card-icon"> <i class="fas fa-tint"></i> </div> <h2>Hydration</h2> </div> <div class="card-value">1.6L / 2.5L</div> </div> <div class="progress-bar"> <div class="progress" style="width: 64%;"></div> </div> <div class="card-content"> <div class="wave-container"> <div class="wave"></div> <div class="wave-level">64%</div> </div> <div class="summary"> <div class="summary-item"> <div class="summary-value">1.6L</div> <div class="summary-label">Consumed</div> </div> <div class="summary-item"> <div class="summary-value">2.5L</div> <div class="summary-label">Daily Goal</div> </div> <div class="summary-item"> <div class="summary-value">900ml</div> <div class="summary-label">Remaining</div> </div> </div> <div id="hydration-chart" class="chart-container"></div> <div class="badges"> <div class="badge"> <div class="badge-icon negative">!</div> <span>Drink 240ml now</span> </div> </div> <div class="insights"> <div class="insights-title">Hydration Insights</div> <div class="insights-text">Your hydration pattern shows you typically drink less water in the afternoon. Setting reminders between 2-5 PM could help you reach your daily goal.</div> </div> </div> </div> </div> </div> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <script> document.addEventListener('DOMContentLoaded', function() { // Card interaction const cards = document.querySelectorAll('.card'); cards.forEach(card => { card.addEventListener('click', function() { // If this card is already expanded, just collapse it if (this.classList.contains('expanded')) { this.classList.remove('expanded'); return; } // Collapse any expanded card document.querySelectorAll('.card.expanded').forEach(expandedCard => { expandedCard.classList.remove('expanded'); }); // Expand this card this.classList.add('expanded'); // Animate progress bars const progress = this.querySelector('.progress'); const width = progress.style.width; progress.style.width = '0'; setTimeout(() => { progress.style.width = width; }, 50); }); }); // Initialize the first card as expanded setTimeout(() => { cards[0].click(); }, 500); // Initialize charts when a card is expanded cards.forEach(card => { card.addEventListener('transitionend', function(e) { if (e.propertyName === 'transform' && this.classList.contains('expanded')) { const cardType = this.className.split(' ')[1]; initChart(cardType); } }); }); function initChart(cardType) { let chartId, data, options, chartElement; const commonOptions = { responsive: true, maintainAspectRatio: false, plugins: { legend: { display: false }, tooltip: { mode: 'index', intersect: false, backgroundColor: 'rgba(255, 255, 255, 0.9)', borderColor: '#ddd', borderWidth: 1, titleColor: '#333', bodyColor: '#666', padding: 10, cornerRadius: 8, titleFont: { size: 14, weight: 'bold' }, bodyFont: { size: 12 }, displayColors: false } }, scales: { x: { grid: { display: false }, ticks: { color: '#999', font: { size: 10 } } }, y: { grid: { color: 'rgba(0, 0,
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>The Daily Insight - Breaking News</title> <style> @import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Source+Sans+Pro:wght@400;600&display=swap'); :root { --primary: #121212; --secondary: #f8f8f8; --accent: #ff3e3e; --gray: #767676; --dark-gray: #353535; --card-shadow: 0 15px 35px rgba(0, 0, 0, 0.2); --card-transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Source Sans Pro', sans-serif; background-color: var(--primary); color: var(--secondary); line-height: 1.6; overflow-x: hidden; width: 100%; height: 100%; padding: 20px; } .container { max-width: 700px; margin: 0 auto; position: relative; overflow-y: auto; height: 660px; -ms-overflow-style: none; scrollbar-width: none; } .container::-webkit-scrollbar { display: none; } .header { padding: 10px 0; margin-bottom: 20px; position: sticky; top: 0; z-index: 100; background: var(--primary); border-bottom: 1px solid rgba(255, 255, 255, 0.1); display: flex; justify-content: space-between; align-items: center; } .logo { font-family: 'Playfair Display', serif; font-weight: 900; font-size: 1.8rem; letter-spacing: -1px; color: var(--secondary); text-transform: uppercase; display: flex; align-items: center; } .logo span { color: var(--accent); } .date { font-size: 0.85rem; color: var(--gray); } .breaking-banner { background-color: var(--accent); color: white; padding: 8px 15px; border-radius: 4px; font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 20px; display: inline-flex; align-items: center; } .breaking-banner::before { content: ""; width: 8px; height: 8px; background-color: white; border-radius: 50%; display: inline-block; margin-right: 8px; animation: pulse 1.5s infinite; } @keyframes pulse { 0% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.2); } 100% { opacity: 1; transform: scale(1); } } .news-cards { display: flex; flex-direction: column; gap: 24px; position: relative; } .card { background-color: var(--dark-gray); border-radius: 8px; overflow: hidden; position: relative; height: 300px; cursor: pointer; box-shadow: var(--card-shadow); transition: var(--card-transition); transform-style: preserve-3d; perspective: 1000px; } .card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4); } .card:hover .card-image { transform: scale(1.05); } .card:hover .card-content { transform: translateY(-5px); } .card:hover .card-title { color: var(--accent); } .card-image-container { position: relative; height: 180px; overflow: hidden; } .card-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; filter: brightness(0.8); } .card.featured { height: 360px; } .card.featured .card-image-container { height: 220px; } .card-content { padding: 15px 20px; position: relative; z-index: 10; transition: transform 0.3s ease; } .card-category { display: inline-block; background-color: var(--accent); color: white; padding: 4px 8px; font-size: 0.7rem; text-transform: uppercase; border-radius: 2px; margin-bottom: 8px; font-weight: 600; letter-spacing: 0.5px; } .card-title { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.4rem; margin-bottom: 10px; transition: color 0.3s ease; line-height: 1.3; } .card.featured .card-title { font-size: 1.8rem; } .card-excerpt { font-size: 0.9rem; color: #cccccc; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .card-meta { display: flex; align-items: center; justify-content: space-between; font-size: 0.75rem; color: var(--gray); margin-top: 10px; } .card-author { display: flex; align-items: center; } .card-author-image { width: 20px; height: 20px; border-radius: 50%; margin-right: 8px; object-fit: cover; } .card-time { display: flex; align-items: center; } .card-time svg { margin-right: 4px; } .loading { height: 3px; width: 100%; background-color: rgba(255, 62, 62, 0.1); position: absolute; top: 0; left: 0; overflow: hidden; } .loading::after { content: ''; display: block; height: 100%; width: 50%; background-color: var(--accent); position: absolute; top: 0; left: 0; animation: loading 1.5s infinite ease-in-out; } @keyframes loading { 0% { transform: translateX(-100%); } 100% { transform: translateX(200%); } } .overlay-gradient { position: absolute; bottom: 0; left: 0; right: 0; height: 60%; background: linear-gradient(to top, rgba(18, 18, 18, 0.9), transparent); z-index: 5; pointer-events: none; } @media (max-width: 500px) { .card, .card.featured { height: auto; } .card-image-container, .card.featured .card-image-container { height: 150px; } .card-title { font-size: 1.2rem; } .card.featured .card-title { font-size: 1.4rem; } .logo { font-size: 1.4rem; } } </style> </head> <body> <div class="container"> <div class="loading"></div> <header class="header"> <h1 class="logo">The Daily<span>Insight</span></h1> <div class="date" id="current-date">June 12, 2023</div> </header> <div class="breaking-banner">Breaking News</div> <div class="news-cards" id="news-cards"> <article class="card featured" data-parallax="0.15"> <div class="card-image-container"> <img src="https://images.unsplash.com/photo-1524413840807-0c3cb6fa808d?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1770&q=80" alt="Global Climate Summit" class="card-image"> <div class="overlay-gradient"></div> </div> <div class="card-content"> <span class="card-category">Environment</span> <h2 class="card-title">Historic Climate Agreement Signed by 195 Nations to Limit Global Warming</h2> <p class="card-excerpt">World leaders commit to unprecedented carbon reduction targets after marathon 72-hour negotiations in Geneva. Experts call it "the turning point we've waited for."</p> <div class="card-meta"> <div class="card-author"> <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Author" class="card-author-image"> <span>Emma Chen</span> </div> <div class="card-time"> <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" 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> <span>35 minutes ago</span> </div> </div> </div> </article> <article class="card" data-parallax="0.1"> <div class="card-image-container"> <img src="https://images.unsplash.com/photo-1496588152823-86ff7695e68f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1770&q=80" alt="Tech Innovation" class="card-image"> <div class="overlay-gradient"></div> </div> <div class="card-content"> <span class="card-category">Technology</span> <h2 class="card-title">Quantum Computing Breakthrough Solves Problem Thought Impossible</h2> <p class="card-excerpt">Scientists at MIT have demonstrated a 128-qubit quantum processor solving complex protein-folding calculations in minutes that would take traditional supercomputers centuries.</p> <div class="card-meta"> <div class="card-author"> <img src="https://randomuser.me/api/portraits/men/32.jpg" alt="Author" class="card-author-image"> <span>David Kim</span> </div> <div class="card-time"> <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" 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> <span>2 hours ago</span> </div> </div> </div> </article> <article class="card" data-parallax="0.2"> <div class="card-image-container"> <img src="https://images.unsplash.com/photo-1581985673517-7419b5ffe2c0?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1770&q=80" alt="Healthcare Innovation" class="card-image"> <div class="overlay-gradient"></div> </div> <div class="card-content"> <span class="card-category">Health</span> <h2 class="card-title">CRISPR Therapy Shows Promising Results in Treating Sickle Cell Disease</h2> <p class="card-excerpt">Clinical trials report 94% success rate in gene-editing treatment that could transform care for millions worldwide suffering from the inherited blood disorder.</p> <div class="card-meta"> <div class="card-author"> <img src="https://randomuser.me/api/portraits/women/68.jpg" alt="Author" class="card-author-image"> <span>Sophia Okafor</span> </div> <div class="card-time"> <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" 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> <span>5 hours ago</span> </div> </div> </div> </article> <article class="card" data-parallax="0.25"> <div class="card-image-container"> <img src="https://images.unsplash.com/photo-1531482615713-2afd69097998?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1770&q=80" alt="Economic News" class="card-image"> <div class="overlay-gradient"></div> </div> <div class="card-content"> <span class="card-category">Economy</span> <h2 class="card-title">Global Markets Rally as Inflation Cools Across Major Economies</h2> <p class="card-excerpt">Wall Street sees biggest single-day gain in 18 months as consumer price data suggests central banks may ease aggressive interest rate hikes sooner than expected.</p> <div class="card-meta"> <div class="card-author"> <img src="https://randomuser.me/api/portraits/men/42.jpg" alt="Author" class="card-author-image"> <span>Marco Diaz</span> </div> <div class="card-time"> <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" 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> <span>8 hours ago</span> </div> </div> </div> </article> </div> </div> <script> // Set current date const dateOptions = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }; document.getElementById('current-date').textContent = new Date().toLocaleDateString('en-US', dateOptions); // Parallax effect on scroll const container = document.querySelector('.container'); const cards = document.querySelectorAll('.card'); container.addEventListener('scroll', () => { const scrollTop = container.scrollTop; cards.forEach(card => { const parallaxFactor = parseFloat(card.getAttribute('data-parallax')) || 0.1; const offsetY = scrollTop * parallaxFactor; // Apply parallax to card and its image card.style.transform = `translateY(${offsetY}px)`; // Get the image within this card and apply a counter-effect const image = card.querySelector('.card-image'); if (image) { image.style.transform = `translateY(-${offsetY * 0.5}px) scale(1.05)`; } }); }); // Card click effect cards.forEach(card => { card.addEventListener('click', function() { this.style.transform = 'scale(0.98) translateY(-5px)'; setTimeout(() => { this.style.transform = ''; }, 200); }); }); // Animation to make cards appear one by one on load window.addEventListener('DOMContentLoaded', () => { cards.forEach((card, index) => { card.style.opacity = '0'; card.style.transform = 'translateY(20px)'; setTimeout(() => { card.style.transition = 'opacity 0.5s ease, transform 0.5s ease'; card.style.opacity = '1'; card.style.transform = 'translateY(0)'; }, 100 * (index + 1)); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Illustrated Portfolio - Stacked Cards</title> <style> @import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;600&family=Nunito:wght@400;600;800&display=swap'); * { margin: 0; padding: 0; box-sizing: border-box; } :root { --primary: #ff7e5f; --secondary: #feb47b; --tertiary: #7be0ad; --dark: #2c3e50; --light: #f9f7f3; --accent: #6c5ce7; --shadow: rgba(0, 0, 0, 0.15); } body { font-family: 'Nunito', sans-serif; background-color: var(--light); background-image: url("data:image/svg+xml,%3Csvg width='52' height='26' viewBox='0 0 52 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23dfd8c8' fill-opacity='0.4'%3E%3Cpath d='M10 10c0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6h2c0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4v2c-3.314 0-6-2.686-6-6 0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6zm25.464-1.95l8.486 8.486-1.414 1.414-8.486-8.486 1.414-1.414z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); overflow-x: hidden; display: flex; justify-content: center; align-items: center; min-height: 700px; padding: 20px; } .portfolio-container { width: 100%; max-width: 660px; height: 660px; position: relative; perspective: 1500px; } .header { position: absolute; top: 0; left: 0; z-index: 100; width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 15px; } .logo { font-family: 'Caveat', cursive; font-size: 28px; font-weight: 600; color: var(--dark); text-decoration: none; position: relative; z-index: 5; display: inline-block; } .logo::after { content: ""; position: absolute; width: 100%; height: 8px; background-color: var(--tertiary); bottom: 5px; left: 0; z-index: -1; border-radius: 4px; transform: rotate(-1deg); } .cards-container { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; } .card { position: absolute; width: 280px; height: 360px; background-color: white; border-radius: 18px; box-shadow: 0 10px 25px var(--shadow); padding: 22px; transform-origin: center center; transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease; overflow: hidden; cursor: pointer; backface-visibility: hidden; will-change: transform; } .card:nth-child(1) { top: 45%; left: 50%; transform: translate(-50%, -50%) rotate(-8deg); background: linear-gradient(135deg, var(--primary), var(--secondary)); z-index: 5; } .card:nth-child(2) { top: 40%; left: 53%; transform: translate(-50%, -50%) rotate(5deg); background: linear-gradient(135deg, var(--tertiary), #a0e7c5); z-index: 4; } .card:nth-child(3) { top: 50%; left: 48%; transform: translate(-50%, -50%) rotate(-3deg); background: linear-gradient(135deg, var(--accent), #a29bfe); z-index: 3; } .card:nth-child(4) { top: 38%; left: 45%; transform: translate(-50%, -50%) rotate(10deg); background: linear-gradient(135deg, #74b9ff, #0984e3); z-index: 2; } .card:hover { box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2); } .card.active { z-index: 10; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(1.1) rotate(0deg); box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25); } .card-content { display: flex; flex-direction: column; height: 100%; color: white; position: relative; } .card-title { font-family: 'Caveat', cursive; font-size: 2.2rem; margin-bottom: 10px; text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2); position: relative; display: inline-block; z-index: 2; } .card-subtitle { font-size: 1rem; opacity: 0.9; margin-bottom: 15px; } .card-image { width: 100%; height: 160px; border-radius: 10px; background-size: cover; background-position: center; margin-bottom: 15px; position: relative; overflow: hidden; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); } .card-image::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.2' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 5v1H0V0h5z'/%3E%3C/g%3E%3C/svg%3E"); opacity: 0.3; } .card-details { font-size: 0.9rem; line-height: 1.4; flex-grow: 1; opacity: 0; transform: translateY(20px); transition: opacity 0.3s ease, transform 0.3s ease; } .active .card-details { opacity: 1; transform: translateY(0); } .card-tools { display: flex; gap: 8px; margin-top: 15px; } .card-tool { padding: 4px 8px; background: rgba(255, 255, 255, 0.25); border-radius: 12px; font-size: 0.7rem; font-weight: 600; backdrop-filter: blur(4px); } .hand-drawn-element { position: absolute; z-index: 1; opacity: 0.7; } .squiggle { width: 100px; height: 20px; background: url("data:image/svg+xml,%3Csvg width='100' height='20' viewBox='0 0 100 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,10 C10,0 20,20 30,10 C40,0 50,20 60,10 C70,0 80,20 90,10 C100,0 110,20 120,10' stroke='%23FFFFFF' stroke-width='3' fill='none'/%3E%3C/svg%3E") no-repeat; top: 15px; right: 15px; } .circle { width: 80px; height: 80px; background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='40' cy='40' r='35' stroke='%23FFFFFF' stroke-width='3' fill='none' stroke-dasharray='5,5'/%3E%3C/svg%3E") no-repeat; bottom: 10px; left: -20px; } .stars { width: 70px; height: 60px; background: url("data:image/svg+xml,%3Csvg width='70' height='60' viewBox='0 0 70 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20,10 L22,16 L28,16 L23,20 L25,26 L20,22 L15,26 L17,20 L12,16 L18,16 L20,10 Z' stroke='%23FFFFFF' stroke-width='2' fill='none'/%3E%3Cpath d='M50,20 L52,26 L58,26 L53,30 L55,36 L50,32 L45,36 L47,30 L42,26 L48,26 L50,20 Z' stroke='%23FFFFFF' stroke-width='2' fill='none'/%3E%3Cpath d='M35,40 L37,46 L43,46 L38,50 L40,56 L35,52 L30,56 L32,50 L27,46 L33,46 L35,40 Z' stroke='%23FFFFFF' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat; top: 40px; right: -20px; } .close-btn { position: absolute; top: 15px; right: 15px; width: 30px; height: 30px; background: rgba(255, 255, 255, 0.3); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; opacity: 0; transform: scale(0.8); transition: opacity 0.3s ease, transform 0.3s ease; z-index: 3; } .active .close-btn { opacity: 1; transform: scale(1); } .nav-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 50; } .nav-dot { width: 12px; height: 12px; border-radius: 50%; background-color: rgba(255, 255, 255, 0.5); cursor: pointer; transition: all 0.3s ease; } .nav-dot.active { background-color: var(--dark); transform: scale(1.3); } .card-image.illustration-1 { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='160' viewBox='0 0 240 160'%3E%3Crect width='240' height='160' fill='%23FFF' /%3E%3Cpath d='M0,80 C60,40 120,120 180,80 C240,40 300,120 360,80' stroke='%232c3e50' stroke-width='8' fill='none' /%3E%3Ccircle cx='60' cy='80' r='30' fill='%23ff7e5f' /%3E%3Crect x='130' y='50' width='60' height='60' fill='%23feb47b' /%3E%3Cpolygon points='200,110 230,70 260,110' fill='%237be0ad' /%3E%3C/svg%3E"); } .card-image.illustration-2 { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='160' viewBox='0 0 240 160'%3E%3Crect width='240' height='160' fill='%23FFF' /%3E%3Ccircle cx='120' cy='80' r='60' fill='%23a0e7c5' stroke='%232c3e50' stroke-width='3' stroke-dasharray='5,5' /%3E%3Ccircle cx='120' cy='80' r='40' fill='%237be0ad' /%3E%3Ccircle cx='120' cy='80' r='20' fill='%23FFFFFF' /%3E%3Cpath d='M50,130 Q120,30 190,130' fill='none' stroke='%232c3e50' stroke-width='3' /%3E%3C/svg%3E"); } .card-image.illustration-3 { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='160' viewBox='0 0 240 160'%3E%3Crect width='240' height='160' fill='%23FFF' /%3E%3Cpath d='M40,40 L200,40 L200,120 L40,120 Z' fill='none' stroke='%232c3e50' stroke-width='3' stroke-dasharray='5,5' /%3E%3Cpath d='M20,20 L220,20 L220,140 L20,140 Z' fill='none' stroke='%232c3e50' stroke-width='3' /%3E%3Ccircle cx='70' cy='70' r='20' fill='%23a29bfe' /%3E%3Ccircle cx='170' cy='70' r='20' fill='%23a29bfe' /%3E%3Cpath d='M70,110 Q120,150 170,110' fill='none' stroke='%232c3e50' stroke-width='3' /%3E%3C/svg%3E"); } .card-image.illustration-4 { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='160' viewBox='0 0 240 160'%3E%3Crect width='240' height='160' fill='%23FFF' /%3E%3Ccircle cx='50' cy='50' r='30' fill='%2374b9ff' /%3E%3Ccircle cx='190' cy='50' r='30' fill='%2374b9ff' /%3E%3Ccircle cx='50' cy='110' r='30' fill='%2374b9ff' /%3E%3Ccircle cx='190' cy='110' r='30' fill='%2374b9ff' /%3E%3Cpath d='M80,50 L160,50 M80,110 L160,110 M50,80 L50,80 M190,80 L190,80' stroke='%230984e3' stroke-width='3' stroke-dasharray='5,5' /%3E%3C/svg%3E"); } .decorative-line { position: absolute; bottom: 50px; left: 50%; transform: translateX(-50%); width: 200px; height: 10px; background: url("data:image/svg+xml,%3Csvg width='200' height='10' viewBox='0 0 200 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,5 C20,0 40,10 60,5 C80,0 100,10 120,5 C140,0 160,10 180,5 C200,0 220,10 240,5' stroke='%232c3e50' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat; opacity: 0.3; } @media (max-width: 600px) { .card { width: 240px; height: 320px; padding: 18px; } .card-title { font-size: 1.8rem; } .card-subtitle { font-size: 0.9rem; } .card-details { font-size: 0.8rem; } .card-image { height: 140px; } } /* Animation for cards on load */ @keyframes cardEntrance { from { transform: translate(-50%, -80%) scale(0.8) rotate(var(--rotation)); opacity: 0; } to { transform: translate(-50%, -50%) rotate(var(--rotation)); opacity: 1; } } .card:nth-child(1) { --rotation: -8deg; animation: cardEntrance 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.1s forwards; opacity: 0; } .card:nth-child(2) { --rotation: 5deg; animation: cardEntrance 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.2s forwards; opacity: 0; } .card:nth-child(3) { --rotation: -3deg; animation: cardEntrance 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s forwards; opacity: 0; } .card:nth-child(4) { --rotation: 10deg; animation: cardEntrance 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.4s forwards; opacity: 0; } .flip-effect { position: absolute; width: 100%; height: 100%; top: 0; left: 0; transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); } .card-back { position: absolute; width: 100%; height: 100%; top: 0; left: 0; padding: 22px; display: flex; flex-direction: column; justify-content: center; align-items: center; transform: rotateY(180deg); backface-visibility: hidden; color: white; background: inherit; border-radius: 18px; } .flipped .flip-effect { transform: rotateY(180deg); } .card-front { backface-visibility: hidden; position: absolute; width: 100%; height: 100%; top: 0; left: 0; } .polaroid-frame { padding: 15px 15px 35px 15px; background-color: white; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); transform: rotate(var(--random-rotate)); transition: transform 0.3s ease; margin-bottom: 20px; position: relative; } .polaroid-frame:hover { transform: rotate(0) scale(1.05); } .polaroid-image { width: 100%; height: 100px; border-radius: 2px; background-size: cover; background-position: center; } .polaroid-caption { font-family: 'Caveat', cursive; text-align: center; margin-top: 8px; font-size: 0.9rem; color: var(--dark); } .card-back .btn { padding: 8px 16px; border-radius: 20px; background: rgba(255, 255, 255, 0.25); color: white; font-weight: 600; border: none; cursor: pointer; margin-top: 15px; backdrop-filter: blur(4px); transition: background 0.3s ease; } .card-back .btn:hover { background: rgba(255, 255, 255, 0.4); } .tape { position: absolute; width: 30px; height: 30px; background-color: rgba(255, 255, 255, 0.6); opacity: 0.7; transform: rotate(var(--tape-rotate)); } .tape-top-left { top: -10px; left: 20px; --tape-rotate: 45deg; } .tape-top-right { top: -10px; right: 20px; --tape-rotate: -45deg; } .card-back .polaroid-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 20px; } .card-back .polaroid-frame { --random-rotate: calc(var(--index) * 3deg - 3deg); height: 120px; } </style> </head> <body> <div class="portfolio-container"> <header class="header"> <a href="#" class="logo">Sketch Folio</a> </header> <div class="cards-container"> <div class="card"> <div class="flip-effect"> <div class="card-front"> <div class="card-content"> <h2 class="card-title">Brand Stories</h2> <p class="card-subtitle">Visual Narratives that Connect</p> <div class="card-image illustration-1"></div> <div class="card-details"> I craft visual identities that tell authentic brand stories, using hand-drawn elements and playful illustrations to create memorable connections with audiences. </div> <div class="card-tools"> <span class="card-tool">Illustration</span> <span class="card-tool">Branding</span> <span class="card-tool">Identity</span> </div> <div class="hand-drawn-element squiggle"></div> <div class="hand-drawn-element circle"></div> </div> <div class="close-btn">×</div> </div> <div class="card-back"> <div class="polaroid-grid"> <div class="polaroid-frame" style="--index: 1"> <div class="tape tape-top-left"></div> <div class="polaroid-image" style="background-color: #ff7e5f"></div> <div class="polaroid-caption">Logo Sketches</div> </div> <div class="polaroid-frame" style="--index: -1"> <div class="tape tape-top-right"></div> <div class="polaroid-image" style="background-color: #feb47b"></div> <div class="polaroid-caption">Color Studies</div> </div> </div> <button class="btn">View Full Case Study</button> </div> </div> </div> <div class="card"> <div class="flip-effect"> <div class="card-front"> <div class="card-content"> <h2 class="card-title">UI Whimsy</h2> <p class="card-subtitle">Interfaces with Personality</p> <div class="card-image illustration-2"></div> <div class="card-details"> My approach to UI design blends functionality with whimsical details, turning ordinary interfaces into experiences that feel personal, handcrafted, and delightful. </div> <div class="card-tools"> <span class="card-tool">UI Design</span> <span class="card-tool">Illustration</span> <span class="card-tool">UX</span> </div> <div class="hand-drawn-element stars"></div> </div> <div class="close-btn">×</div> </div> <div class="card-back"> <div class="polaroid-grid"> <div class="polaroid-frame" style="--index: 0.5"> <div class="tape tape-top-left"></div> <div class="polaroid-image" style="background-color: #7be0ad"></div> <div class="polaroid-caption">Button States</div> </div> <div class="polaroid-frame" style="--index: -0.5"> <div class="tape tape-top-right"></div> <div class="polaroid-image" style="background-color: #a0e7c5"></div> <div class="polaroid-caption">Menu Animation</div> </div> </div> <button class="btn">Explore Process</button> </div> </div> </div> <div class="card"> <div class="flip-effect"> <div class="card-front"> <div class="card-content"> <h2 class="card-title">Illustrated Maps</h2> <p class="card-subtitle">Places with Personality</p> <div class="card-image illustration-3"></div> <div class="card-details"> I transform geographical spaces into illustrated stories, highlighting the character and quirks of neighborhoods with hand-drawn landmarks and playful annotations. </div> <div class="card-tools"> <span class="card-tool">Maps</span> <span class="card-tool">Drawing</span> <span class="card-tool">Editorial</span> </div> <div class="hand-drawn-element squiggle"></div> </div> <div class="close-btn">×</div> </div> <div class="card-back"> <div class="polaroid-grid"> <div class="polaroid-frame" style="--index: 1.5"> <div class="tape tape-top-left"></div> <div class="polaroid-image" style="background-color: #6c5ce7"></div> <div class="polaroid-caption">Sketches</div> </div> <div class="polaroid-frame" style="--index: -1.5"> <div class="tape tape-top-right"></div> <div class="polaroid-image" style="background-color: #a29bfe"></div> <div class="polaroid-caption">Detail Work</div> </div> </div> <button class="btn">See Full Map</button> </div> </div> </div> <div class="card"> <div class="flip-effect"> <div class="card-front"> <div class="card-content"> <h2 class="card-title">Editorial Play</h2> <p class="card-subtitle">Stories Visually Told</p> <div class="card-image illustration-4"></div> <div class="card-details"> My editorial illustrations bring concepts to life with a distinctive style that balances playfulness with clarity, making complex ideas accessible and engaging. </div> <div class="card-tools"> <span class="card-tool">Editorial</span> <span class="card-tool">Concept</span> <span class="card-tool">Publication</span> </div> <div class="hand-drawn-element circle"></div> <div class="hand-drawn-element stars"></div> </div> <div class="close-btn">×</div> </div> <div class="card-back"> <div class="polaroid-grid"> <div class="polaroid-frame" style="--index: 0"> <div class="tape tape-top-left"></div> <div class="polaroid-image" style="background-color: #74b9ff"></div> <div class="polaroid-caption">Rough Ideas</div> </div> <div class="polaroid-frame" style="--index: -2"> <div class="tape tape-top-right"></div> <div class="polaroid-image" style="background-color: #0984e3"></div> <div class="polaroid-caption">Final Art</div> </div> </div> <button class="btn">Browse Portfolio</button> </div> </div> </div> </div> <div class="nav-dots"> <div class="nav-dot active" data-index="0"></div> <div class="nav-dot" data-index="1"></div> <div class="nav-dot" data-index="2"></div> <div class="nav-dot" data-index="3"></div> </div> <div class="decorative-line"></div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const cards = document.querySelectorAll('.card'); const navDots = document.querySelectorAll('.nav-dot'); let activeCard = null; // Initial staggered animation delay cards.forEach((card, index) => { card.style.animationDelay = `${(index + 1) * 100}ms`; }); // Function to activate a card function activateCard(card) { if (activeCard) { activeCard.classList.remove('active'); activeCard.classList.remove('flipped'); } card.classList.add('active'); activeCard = card; // Update nav dots const index = Array.from(cards).indexOf(card); navDots.forEach(dot => dot.classList.remove('active')); navDots[index].classList.add('active'); } // Card click event cards.forEach(card => { card.addEventListener('click', function(e) { if (e.target.classList.contains('close-btn')) { card.classList.remove('active'); activeCard = null; return; } if (card === activeCard && !card.classList.contains('flipped')) { card.classList.add('flipped'); } else if (!card.classList.contains('active')) { activateCard(card); } }); }); // Nav dots click event navDots.forEach((dot, index) => { dot.addEventListener('click', function() { activateCard(cards[index]); }); }); // "Esc" key closes active card document.addEventListener('keydown', function(e) { if (e.key === 'Escape' && activeCard) { activeCard.classList.remove('active'); activeCard.classList.remove('flipped'); activeCard = null; } }); // Buttons in card back should not flip the card back document.querySelectorAll('.card-back .btn').forEach(btn => { btn.addEventListener('click', function(e) { e.stopPropagation(); // Could add additional functionality here }); }); // Add hover effect with slight rotation based on mouse position cards.forEach(card => { card.addEventListener('mousemove', function(e) { if (card !== activeCard) { const rect = card.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; const centerX = rect.width / 2; const centerY = rect.height / 2; const rotateX = (y - centerY) / 20; const rotateY = (centerX - x) / 20; card.style.transform = `translate(-50%, -50%) rotate(var(--rotation)) perspective(500px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`; } }); card.addEventListener('mouseleave', function() { if (card !== activeCard) { card.style.transform = `translate(-50%, -50%) rotate(var(--rotation))`; } }); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Educational Stacked Cards</title> <style> @import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap'); :root { --pastel-blue: #A2D2FF; --pastel-pink: #FFC8DD; --pastel-yellow: #FDFFB6; --pastel-green: #CAFFBF; --pastel-purple: #BDB2FF; --card-radius: 18px; --shadow: 0 10px 20px rgba(0,0,0,0.1); --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Nunito', sans-serif; background-color: #f9f9f9; display: flex; justify-content: center; align-items: center; min-height: 700px; padding: 20px; overflow-x: hidden; } .container { width: 100%; max-width: 700px; padding: 20px; position: relative; } .header { text-align: center; margin-bottom: 30px; position: relative; z-index: 5; } .header h1 { font-size: 28px; color: #333; margin-bottom: 10px; position: relative; display: inline-block; } .header h1:after { content: ''; position: absolute; bottom: -5px; left: 0; width: 100%; height: 10px; background-color: var(--pastel-yellow); z-index: -1; transform: skew(-5deg); opacity: 0.8; } .header p { font-size: 16px; color: #666; max-width: 600px; margin: 0 auto; } .cards-container { position: relative; margin-top: 50px; height: 450px; perspective: 1000px; } .card { position: absolute; width: 80%; height: 120px; background: white; border-radius: var(--card-radius); box-shadow: var(--shadow); padding: 20px; overflow: hidden; cursor: pointer; transition: var(--transition); transform-origin: center bottom; left: 10%; transform-style: preserve-3d; display: flex; flex-direction: column; justify-content: space-between; } .card-title { font-weight: 700; font-size: 18px; color: #333; margin-bottom: 8px; position: relative; z-index: 2; } .card-preview { color: #666; font-size: 14px; margin-bottom: 5px; line-height: 1.4; position: relative; z-index: 2; } .card-icon { position: absolute; top: 20px; right: 20px; font-size: 24px; color: rgba(0,0,0,0.1); transition: var(--transition); } .card-content { height: 0; opacity: 0; overflow: hidden; transition: var(--transition); margin-top: 10px; position: relative; z-index: 2; } .card-hint { font-size: 13px; color: #888; position: absolute; bottom: 15px; right: 15px; opacity: 0.7; } .card-progress { position: absolute; bottom: 0; left: 0; height: 5px; width: 0; transition: width 0.3s ease; } .card.expanded { transform: translateY(0) scale(1) !important; height: 320px; z-index: 10; } .card.expanded .card-content { height: auto; opacity: 1; margin-top: 20px; } .card.expanded .card-icon { transform: rotate(180deg); } .card.expanded .card-hint { opacity: 0; } .card:nth-child(1) { background: linear-gradient(135deg, white 85%, var(--pastel-blue) 100%); transform: translateY(0px) scale(1); z-index: 5; } .card:nth-child(2) { background: linear-gradient(135deg, white 85%, var(--pastel-pink) 100%); transform: translateY(60px) scale(0.97); z-index: 4; } .card:nth-child(3) { background: linear-gradient(135deg, white 85%, var(--pastel-yellow) 100%); transform: translateY(110px) scale(0.94); z-index: 3; } .card:nth-child(4) { background: linear-gradient(135deg, white 85%, var(--pastel-green) 100%); transform: translateY(150px) scale(0.91); z-index: 2; } .card:nth-child(5) { background: linear-gradient(135deg, white 85%, var(--pastel-purple) 100%); transform: translateY(180px) scale(0.88); z-index: 1; } .card:nth-child(1) .card-progress { background-color: var(--pastel-blue); } .card:nth-child(2) .card-progress { background-color: var(--pastel-pink); } .card:nth-child(3) .card-progress { background-color: var(--pastel-yellow); } .card:nth-child(4) .card-progress { background-color: var(--pastel-green); } .card:nth-child(5) .card-progress { background-color: var(--pastel-purple); } .card:not(.expanded):hover { transform: translateY(0) scale(1.02) !important; box-shadow: 0 15px 30px rgba(0,0,0,0.15); } .card-content ul { padding-left: 20px; margin-bottom: 15px; } .card-content li { margin-bottom: 8px; position: relative; } .card-content li::before { content: '•'; position: absolute; left: -15px; color: #888; } .module-nav { display: flex; justify-content: space-between; margin-top: 10px; } .btn { padding: 8px 15px; border: none; border-radius: 20px; font-family: 'Nunito', sans-serif; font-weight: 600; font-size: 14px; cursor: pointer; transition: all 0.3s ease; outline: none; } .btn:focus { outline: none; } .btn-primary { background-color: #333; color: white; } .btn-primary:hover { background-color: #222; transform: translateY(-2px); box-shadow: 0 5px 10px rgba(0,0,0,0.1); } .btn-outline { background-color: transparent; border: 1px solid #ccc; color: #666; } .btn-outline:hover { background-color: #f5f5f5; border-color: #999; } .floating-shapes { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; opacity: 0.5; overflow: hidden; } .shape { position: absolute; opacity: 0.1; border-radius: 50%; } @keyframes float { 0% { transform: translate(0, 0) rotate(0deg); } 100% { transform: translate(20px, 20px) rotate(360deg); } } .progress-indicator { display: flex; justify-content: center; margin-top: 10px; position: relative; z-index: 5; } .progress-dot { width: 10px; height: 10px; border-radius: 50%; background: #ddd; margin: 0 5px; transition: all 0.3s ease; } .progress-dot.active { background: #333; transform: scale(1.2); } .progress-label { font-size: 14px; color: #888; text-align: center; margin-top: 5px; } @media (max-width: 600px) { .header h1 { font-size: 24px; } .header p { font-size: 14px; } .card { padding: 15px; width: 90%; left: 5%; } .card-title { font-size: 16px; } .card-preview { font-size: 13px; } } </style> </head> <body> <div class="container"> <div class="header"> <h1>Interactive Learning Path</h1> <p>Explore our carefully crafted modules designed to build your skills progressively. Tap any card to dive deeper.</p> </div> <div class="cards-container"> <div class="floating-shapes"> <!-- Floating shapes are added via JavaScript --> </div> <div class="card"> <div> <h3 class="card-title">Foundations of Design Thinking</h3> <p class="card-preview">Learn the core principles of human-centered design and creative problem-solving.</p> </div> <div class="card-content"> <p>This introductory module covers the essential mindsets and methodologies that drive effective design thinking.</p> <ul> <li>Understanding empathy in the design process</li> <li>Framing problems as opportunities</li> <li>Iterative prototyping techniques</li> <li>Real-world case studies of design thinking success</li> </ul> <div class="module-nav"> <button class="btn btn-outline close-card">Close</button> <button class="btn btn-primary">Start Learning</button> </div> </div> <span class="card-icon">↓</span> <span class="card-hint">Tap to expand</span> <div class="card-progress"></div> </div> <div class="card"> <div> <h3 class="card-title">Visual Communication Basics</h3> <p class="card-preview">Master the fundamental elements of visual hierarchy, typography, and color theory.</p> </div> <div class="card-content"> <p>Develop a designer's eye and learn how to communicate effectively through visual elements.</p> <ul> <li>Creating meaningful visual hierarchies</li> <li>Typography selection and pairing</li> <li>Color psychology and accessible palettes</li> <li>Composition and layout principles</li> </ul> <div class="module-nav"> <button class="btn btn-outline close-card">Close</button> <button class="btn btn-primary">Start Learning</button> </div> </div> <span class="card-icon">↓</span> <span class="card-hint">Tap to expand</span> <div class="card-progress"></div> </div> <div class="card"> <div> <h3 class="card-title">User Research Techniques</h3> <p class="card-preview">Discover practical methods to understand your users' needs, behaviors, and motivations.</p> </div> <div class="card-content"> <p>Learn to gather meaningful insights that inform design decisions and create more user-centered products.</p> <ul> <li>Conducting effective user interviews</li> <li>Creating and using personas</li> <li>Journey mapping and experience analysis</li> <li>Translating research into actionable design briefs</li> </ul> <div class="module-nav"> <button class="btn btn-outline close-card">Close</button> <button class="btn btn-primary">Start Learning</button> </div> </div> <span class="card-icon">↓</span> <span class="card-hint">Tap to expand</span> <div class="card-progress"></div> </div> <div class="card"> <div> <h3 class="card-title">Prototyping Methods</h3> <p class="card-preview">Learn to build effective low and high-fidelity prototypes to test and refine your ideas.</p> </div> <div class="card-content"> <p>Explore various prototyping techniques and learn when to apply each for maximum impact.</p> <ul> <li>Paper prototyping for early concepts</li> <li>Digital prototyping tools and workflows</li> <li>Testing methodologies for different fidelities</li> <li>Iterative refinement based on feedback</li> </ul> <div class="module-nav"> <button class="btn btn-outline close-card">Close</button> <button class="btn btn-primary">Start Learning</button> </div> </div> <span class="card-icon">↓</span> <span class="card-hint">Tap to expand</span> <div class="card-progress"></div> </div> <div class="card"> <div> <h3 class="card-title">Design Systems & Documentation</h3> <p class="card-preview">Build scalable design systems that maintain consistency across products and teams.</p> </div> <div class="card-content"> <p>Understand how to create and maintain effective design systems that scale with your organization.</p> <ul> <li>Component libraries and atomic design</li> <li>Documentation best practices</li> <li>Design tokens and variables</li> <li>Collaboration between design and development</li> </ul> <div class="module-nav"> <button class="btn btn-outline close-card">Close</button> <button class="btn btn-primary">Start Learning</button> </div> </div> <span class="card-icon">↓</span> <span class="card-hint">Tap to expand</span> <div class="card-progress"></div> </div> </div> <div class="progress-indicator"> <div class="progress-dot active"></div> <div class="progress-dot"></div> <div class="progress-dot"></div> <div class="progress-dot"></div> <div class="progress-dot"></div> </div> <div class="progress-label">1 of 5 modules completed</div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const cards = document.querySelectorAll('.card'); const progressDots = document.querySelectorAll('.progress-dot'); const progressLabel = document.querySelector('.progress-label'); const container = document.querySelector('.floating-shapes'); // Create floating shapes for (let i = 0; i < 15; i++) { const shape = document.createElement('div'); shape.classList.add('shape'); // Random properties const size = Math.random() * 60 + 20; const posX = Math.random() * 100; const posY = Math.random() * 100; const color = i % 5 === 0 ? '#A2D2FF' : i % 5 === 1 ? '#FFC8DD' : i % 5 === 2 ? '#FDFFB6' : i % 5 === 3 ? '#CAFFBF' : '#BDB2FF'; const duration = Math.random() * 20 + 10; const delay = Math.random() * 5; // Apply styles shape.style.width = `${size}px`; shape.style.height = `${size}px`; shape.style.top = `${posY}%`; shape.style.left = `${posX}%`; shape.style.backgroundColor = color; shape.style.animation = `float ${duration}s ease-in-out ${delay}s infinite alternate`; container.appendChild(shape); } // Card expansion/collapse functionality cards.forEach((card, index) => { // Set progress for first card if (index === 0) { setTimeout(() => { card.querySelector('.card-progress').style.width = '100%'; }, 1000); } card.addEventListener('click', function(e) { // Don't close if clicking on the close button if (e.target.classList.contains('close-card') || e.target.closest('.close-card')) { return; } const isExpanded = this.classList.contains('expanded'); // Close all cards first cards.forEach(c => { c.classList.remove('expanded'); }); // If the card wasn't expanded, expand it if (!isExpanded) { this.classList.add('expanded'); } }); // Close button functionality const closeBtn = card.querySelector('.close-card'); if (closeBtn) { closeBtn.addEventListener('click', function(e) { e.stopPropagation(); card.classList.remove('expanded'); }); } // Start learning button - just adding progress for demo const startBtn = card.querySelector('.btn-primary'); if (startBtn) { startBtn.addEventListener('click', function(e) { e.stopPropagation(); // Animate progress const progress = card.querySelector('.card-progress'); progress.style.width = '100%'; // Update progress dots progressDots.forEach((dot, i) => { if (i <= index) { dot.classList.add('active'); } }); // Update progress label progressLabel.textContent = `${index + 1} of 5 modules completed`; // Close card after a delay setTimeout(() => { card.classList.remove('expanded'); }, 1000); }); } }); // Simulate hover effect for touch devices cards.forEach(card => { card.addEventListener('touchstart', function() { if (!this.classList.contains('expanded')) { this.classList.add('hover-effect'); } }); card.addEventListener('touchend', function() { this.classList.remove('hover-effect'); }); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Wanderlust Stacked Cards</title> <style> :root { --primary-color: #ff6b6b; --secondary-color: #4ecdc4; --accent-color: #ffd166; --dark-color: #283c63; --light-color: #f7fff7; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Montserrat', sans-serif; } body { background-color: #f0f2f5; background-image: radial-gradient(var(--light-color) 1px, transparent 1px); background-size: 20px 20px; display: flex; justify-content: center; align-items: center; min-height: 100vh; overflow-x: hidden; padding: 20px; } .container { width: 100%; max-width: 700px; height: 700px; position: relative; perspective: 1000px; overflow: hidden; } .travel-title { text-align: center; margin-bottom: 20px; color: var(--dark-color); position: relative; z-index: 10; } .travel-title h1 { font-size: 2.5rem; margin-bottom: 5px; letter-spacing: 1.5px; text-transform: uppercase; } .travel-title p { font-size: 1rem; color: #666; font-style: italic; } .stamp { position: absolute; top: 15px; right: 15px; width: 70px; height: 70px; background-color: var(--accent-color); border-radius: 5px; transform: rotate(15deg); display: flex; justify-content: center; align-items: center; font-weight: bold; color: var(--dark-color); font-size: 0.8rem; text-transform: uppercase; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); z-index: 2; } .card-stack { position: relative; width: 90%; max-width: 600px; height: 550px; margin: 0 auto; } .card { position: absolute; width: 100%; height: 350px; border-radius: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); transition: all 0.7s cubic-bezier(0.645, 0.045, 0.355, 1); overflow: hidden; cursor: pointer; transform-origin: center bottom; background-color: white; } .card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.7) 100%); z-index: 1; } .card-photo { width: 100%; height: 65%; object-fit: cover; border-top-left-radius: 15px; border-top-right-radius: 15px; } .card-content { padding: 15px; height: 35%; } .card-title { font-size: 1.4rem; color: var(--dark-color); margin-bottom: 8px; } .card-description { font-size: 0.9rem; color: #555; line-height: 1.4; } .card-flip { position: absolute; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.8s; backface-visibility: hidden; } .card-front, .card-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 15px; } .card-back { transform: rotateY(180deg); background-color: white; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; } .card.flipped .card-flip { transform: rotateY(180deg); } .card:nth-child(1) { transform: translateY(0) translateZ(50px) scale(1); z-index: 5; } .card:nth-child(2) { transform: translateY(40px) translateZ(40px) scale(0.95); z-index: 4; } .card:nth-child(3) { transform: translateY(80px) translateZ(30px) scale(0.9); z-index: 3; } .card:nth-child(4) { transform: translateY(120px) translateZ(20px) scale(0.85); z-index: 2; } .card:nth-child(5) { transform: translateY(160px) translateZ(10px) scale(0.8); z-index: 1; } .stamp-text { position: relative; transform: rotate(-15deg); } .travel-tips { background-color: #f8f9fa; padding: 15px; border-radius: 8px; margin-bottom: 15px; } .travel-tips h4 { margin-bottom: 10px; color: var(--dark-color); } .travel-tips ul { padding-left: 20px; font-size: 0.9rem; color: #555; } .travel-tips li { margin-bottom: 5px; } .booking-options { display: flex; flex-direction: column; } .booking-options h4 { margin-bottom: 10px; color: var(--dark-color); } .price { font-size: 1.5rem; font-weight: bold; color: var(--primary-color); margin-bottom: 10px; } .book-btn { background-color: var(--secondary-color); color: white; border: none; padding: 10px 15px; border-radius: 5px; font-weight: bold; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); } .book-btn:hover { background-color: #3dbeb6; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); } .card-marker { position: absolute; top: 15px; right: 15px; background-color: var(--primary-color); color: white; padding: 5px 10px; border-radius: 20px; font-size: 0.8rem; z-index: 2; } .postcard-divider { position: absolute; top: 65%; left: 15px; right: 15px; height: 1px; background: repeating-linear-gradient( to right, #ddd, #ddd 5px, transparent 5px, transparent 10px ); } .location-dot { width: 30px; height: 30px; border-radius: 50%; background-color: var(--primary-color); position: absolute; top: 20px; left: 20px; display: flex; justify-content: center; align-items: center; z-index: 2; animation: pulse 2s infinite; } @keyframes pulse { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7); } 70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(255, 107, 107, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); } } .location-dot i { color: white; font-size: 14px; } .card-active { transform: translateY(-50px) translateZ(100px) scale(1.05) !important; z-index: 10 !important; } .card-next, .card-prev { margin-top: 15px; display: flex; justify-content: center; } .nav-btn { background-color: var(--dark-color); color: white; border: none; width: 40px; height: 40px; border-radius: 50%; display: flex; justify-content: center; align-items: center; margin: 0 10px; cursor: pointer; transition: all 0.3s ease; } .nav-btn:hover { background-color: var(--primary-color); transform: scale(1.1); } .flip-btn { position: absolute; bottom: 15px; right: 15px; background-color: var(--accent-color); color: var(--dark-color); border: none; width: 30px; height: 30px; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: all 0.3s ease; z-index: 2; } .flip-btn:hover { background-color: #ffc633; transform: scale(1.1); } .back-to-front { position: absolute; top: 15px; right: 15px; background-color: var(--accent-color); color: var(--dark-color); border: none; width: 30px; height: 30px; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: all 0.3s ease; } .back-to-front:hover { background-color: #ffc633; transform: scale(1.1); } @media (max-width: 576px) { .travel-title h1 { font-size: 1.8rem; } .travel-title p { font-size: 0.9rem; } .card { height: 300px; } .card-title { font-size: 1.2rem; } .card-description { font-size: 0.8rem; } .card:nth-child(2) { transform: translateY(25px) translateZ(40px) scale(0.95); } .card:nth-child(3) { transform: translateY(50px) translateZ(30px) scale(0.9); } .card:nth-child(4) { transform: translateY(75px) translateZ(20px) scale(0.85); } .card:nth-child(5) { transform: translateY(100px) translateZ(10px) scale(0.8); } } @keyframes floatIn { 0% { opacity: 0; transform: translateY(40px); } 100% { opacity: 1; transform: translateY(0); } } .container { animation: floatIn 1s ease-out forwards; } </style> <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap" rel="stylesheet"> <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="travel-title"> <h1>Wanderlust Discoveries</h1> <p>Unforgettable experiences await at these hidden gems</p> </div> <div class="card-stack"> <div class="card" data-index="0"> <div class="card-flip"> <div class="card-front"> <div class="location-dot"> <i class="fas fa-map-marker-alt"></i> </div> <div class="card-marker">Best Value</div> <img src="https://images.unsplash.com/photo-1523906834658-6e24ef2386f9?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" class="card-photo" alt="Paris, France"> <div class="postcard-divider"></div> <div class="card-content"> <h3 class="card-title">Paris, France</h3> <p class="card-description">Explore the charming streets where romance meets history, with hidden cafés and iconic landmarks at every turn.</p> </div> <button class="flip-btn"> <i class="fas fa-sync-alt"></i> </button> </div> <div class="card-back"> <button class="back-to-front"> <i class="fas fa-arrow-left"></i> </button> <div class="travel-tips"> <h4>Insider Tips</h4> <ul> <li>Visit Montmartre in the early morning to avoid crowds</li> <li>The Paris Museum Pass pays for itself after 3 attractions</li> <li>Picnic along the Seine for an authentic local experience</li> </ul> </div> <div class="booking-options"> <h4>5-Day Parisian Getaway</h4> <div class="price">€1,249</div> <button class="book-btn">Reserve Your Spot</button> </div> </div> </div> <div class="stamp"> <div class="stamp-text">20% OFF</div> </div> </div> <div class="card" data-index="1"> <div class="card-flip"> <div class="card-front"> <div class="location-dot"> <i class="fas fa-map-marker-alt"></i> </div> <div class="card-marker">Editor's Choice</div> <img src="https://images.unsplash.com/photo-1535159530326-d7bf00715c66?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" class="card-photo" alt="Santorini, Greece"> <div class="postcard-divider"></div> <div class="card-content"> <h3 class="card-title">Santorini, Greece</h3> <p class="card-description">White-washed villas cascade down volcanic cliffs, offering unmatched sunsets over the azure Aegean Sea.</p> </div> <button class="flip-btn"> <i class="fas fa-sync-alt"></i> </button> </div> <div class="card-back"> <button class="back-to-front"> <i class="fas fa-arrow-left"></i> </button> <div class="travel-tips"> <h4>Insider Tips</h4> <ul> <li>Book accommodations in Imerovigli for the best caldera views</li> <li>Hike from Fira to Oia for breathtaking coastal vistas</li> <li>Visit the red and black beaches for unique volcanic scenery</li> </ul> </div> <div class="booking-options"> <h4>7-Day Island Escape</h4> <div class="price">€1,875</div> <button class="book-btn">Reserve Your Spot</button> </div> </div> </div> </div> <div class="card" data-index="2"> <div class="card-flip"> <div class="card-front"> <div class="location-dot"> <i class="fas fa-map-marker-alt"></i> </div> <div class="card-marker">Hidden Gem</div> <img src="https://images.unsplash.com/photo-1512453979798-5ea266f8880c?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" class="card-photo" alt="Kyoto, Japan"> <div class="postcard-divider"></div> <div class="card-content"> <h3 class="card-title">Kyoto, Japan</h3> <p class="card-description">Ancient temples, traditional tea houses, and serene gardens preserve Japan's cultural heart.</p> </div> <button class="flip-btn"> <i class="fas fa-sync-alt"></i> </button> </div> <div class="card-back"> <button class="back-to-front"> <i class="fas fa-arrow-left"></i> </button> <div class="travel-tips"> <h4>Insider Tips</h4> <ul> <li>Visit Fushimi Inari Shrine at dawn to beat the crowds</li> <li>Rent a bicycle to explore the eastern hills efficiently</li> <li>Experience a traditional tea ceremony in Gion district</li> </ul> </div> <div class="booking-options"> <h4>10-Day Cultural Journey</h4> <div class="price">¥245,000</div> <button class="book-btn">Reserve Your Spot</button> </div> </div> </div> </div> <div class="card" data-index="3"> <div class="card-flip"> <div class="card-front"> <div class="location-dot"> <i class="fas fa-map-marker-alt"></i> </div> <div class="card-marker">New Destination</div> <img src="https://images.unsplash.com/photo-1534367507873-d2d7e24c797f?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" class="card-photo" alt="Machu Picchu, Peru"> <div class="postcard-divider"></div> <div class="card-content"> <h3 class="card-title">Machu Picchu, Peru</h3> <p class="card-description">This ancient Incan citadel sits perched among majestic Andean peaks, shrouded in mountain mist and mystery.</p> </div> <button class="flip-btn"> <i class="fas fa-sync-alt"></i> </button> </div> <div class="card-back"> <button class="back-to-front"> <i class="fas fa-arrow-left"></i> </button> <div class="travel-tips"> <h4>Insider Tips</h4> <ul> <li>Book the Inca Trail permits 6 months in advance</li> <li>Spend a night in Aguas Calientes to visit Machu Picchu at sunrise</li> <li>Hike Huayna Picchu for the iconic bird's-eye view</li> </ul> </div> <div class="booking-options"> <h4>8-Day Andean Adventure</h4> <div class="price">$2,150</div> <button class="book-btn">Reserve Your Spot</button> </div> </div> </div> </div> <div class="card" data-index="4"> <div class="card-flip"> <div class="card-front"> <div class="location-dot"> <i class="fas fa-map-marker-alt"></i> </div> <div class="card-marker">Family Favorite</div> <img src="https://images.unsplash.com/photo-1579688565352-e4e705ead0aa?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" class="card-photo" alt="Bali, Indonesia"> <div class="postcard-divider"></div> <div class="card-content"> <h3 class="card-title">Bali, Indonesia</h3> <p class="card-description">Verdant rice terraces, sacred temples, and vibrant coral reefs make this island a paradise for all travelers.</p> </div> <button class="flip-btn"> <i class="fas fa-sync-alt"></i> </button> </div> <div class="card-back"> <button class="back-to-front"> <i class="fas fa-arrow-left"></i> </button> <div class="travel-tips"> <h4>Insider Tips</h4> <ul> <li>Stay in Ubud for cultural immersion, Seminyak for beaches</li> <li>Visit the Tegallalang Rice Terraces in early morning light</li> <li>Take a cooking class to master Balinese spices and techniques</li> </ul> </div> <div class="booking-options"> <h4>12-Day Island Paradise</h4> <div class="price">$1,690</div> <button class="book-btn">Reserve Your Spot</button> </div> </div> </div> </div> </div> <div class="card-nav"> <div class="card-prev"> <button class="nav-btn prev-btn"> <i class="fas fa-chevron-left"></i> </button> <button class="nav-btn next-btn"> <i class="fas fa-chevron-right"></i> </button> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const cards = document.querySelectorAll('.card'); const nextBtn = document.querySelector('.next-btn'); const prevBtn = document.querySelector('.prev-btn'); const flipBtns = document.querySelectorAll('.flip-btn'); const backBtns = document.querySelectorAll('.back-to-front'); const bookBtns = document.querySelectorAll('.book-btn'); let activeIndex = 0; // Initialize with first card active cards[activeIndex].classList.add('card-active'); // Set up navigation buttons nextBtn.addEventListener('click', function() { if (activeIndex < cards.length - 1) { cards[activeIndex].classList.remove('card-active'); cards[activeIndex].classList.remove('flipped'); activeIndex++; cards[activeIndex].classList.add('card-active'); } }); prevBtn.addEventListener('click', function() { if (activeIndex > 0) { cards[activeIndex].classList.remove('card-active'); cards[activeIndex].classList.remove('flipped'); activeIndex--; cards[activeIndex].classList.add('card-active'); } }); // Set up flip buttons flipBtns.forEach((btn, index) => { btn.addEventListener('click', function(e) { e.stopPropagation(); cards[index].classList.add('flipped'); }); }); // Set up back buttons backBtns.forEach((btn, index) => { btn.addEventListener('click', function(e) { e.stopPropagation(); cards[index].classList.remove('flipped'); }); }); // Card click handler cards.forEach((card, index) => { card.addEventListener('click', function() { if (!card.classList.contains('card-active')) { cards[activeIndex].classList.remove('card-active'); cards[activeIndex].classList.remove('flipped'); activeIndex = index; card.classList.add('card-active'); } }); }); // Book button handler - prevent default behavior bookBtns.forEach(btn => { btn.addEventListener('click', function(e) { e.preventDefault(); e.stopPropagation(); // Animation feedback for button btn.style.transform = 'scale(0.95)'; setTimeout(() => { btn.style.transform = 'scale(1)'; btn.textContent = 'Booking Confirmed!'; btn.style.backgroundColor = '#4CAF50'; }, 200); // Reset after 2 seconds setTimeout(() => { btn.textContent = 'Reserve Your Spot'; btn.style.backgroundColor = ''; }, 2000); }); }); // Add hover effect for cards cards.forEach(card => { card.addEventListener('mouseenter', function() { if (!card.classList.contains('card-active') && !card.classList.contains('flipped')) { card.style.transform = `${card.style.transform.split('scale')[0]} scale(${parseFloat(card.style.transform.split('scale(')[1]) + 0.05})`; } }); card.addEventListener('mouseleave', function() { if (!card.classList.contains('card-active') && !card.classList.contains('flipped')) { const index = parseInt(card.getAttribute('data-index')); if (index === 0) { card.style.transform = 'translateY(0) translateZ(50px) scale(1)'; } else if (index === 1) { card.style.transform = 'translateY(40px) translateZ(40px) scale(0.95)'; } else if (index === 2) { card.style.transform = 'translateY(80px) translateZ(30px) scale(0.9)'; } else if (index === 3) { card.style.transform = 'translateY(120px) translateZ(20px) scale(0.85)'; } else if (index === 4) { card.style.transform = 'translateY(160px) translateZ(10px) scale(0.8)'; } } }); }); }); </script> </body> </html>
<html> <head> <style> /* Reset and base styles */ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: 'Inter', 'Segoe UI', sans-serif; background-color: #0b0b10; color: #e0e0e0; overflow-x: hidden; display: flex; justify-content: center; align-items: center; min-height: 700px; perspective: 1000px; background-image: radial-gradient(circle at 10% 20%, rgba(0, 212, 255, 0.03) 0%, transparent 30%), radial-gradient(circle at 90% 80%, rgba(250, 44, 198, 0.03) 0%, transparent 30%); } .container { width: 100%; max-width: 700px; padding: 20px; perspective: 1000px; } .title-section { text-align: center; margin-bottom: 40px; position: relative; } .title-section h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 10px; background: linear-gradient(to right, #00d4ff, #fa2cc6); -webkit-background-clip: text; background-clip: text; color: transparent; text-transform: uppercase; letter-spacing: 1px; } .title-section p { font-size: 1rem; color: #a0a0a0; max-width: 500px; margin: 0 auto; position: relative; } .grid-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: linear-gradient(rgba(16, 16, 20, 0.7) 1px, transparent 1px), linear-gradient(90deg, rgba(16, 16, 20, 0.7) 1px, transparent 1px); background-size: 20px 20px; z-index: -1; opacity: 0.4; pointer-events: none; } /* Cards container */ .cards-container { display: flex; flex-direction: column; gap: 30px; transform-style: preserve-3d; } /* Card styles */ .card { position: relative; background-color: rgba(20, 20, 28, 0.7); border-radius: 12px; padding: 25px; transform-style: preserve-3d; transform: translateZ(0); backface-visibility: hidden; transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1); overflow: hidden; box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1) inset; } .card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(130deg, rgba(0, 212, 255, 0.05) 0%, rgba(250, 44, 198, 0.05) 100%); opacity: 0; transition: opacity 0.4s ease; z-index: -1; } .card::after { content: ''; position: absolute; top: -2px; left: -2px; right: -2px; bottom: -2px; background: linear-gradient(45deg, #00d4ff, #fa2cc6); border-radius: 14px; z-index: -2; opacity: 0; transition: opacity 0.4s ease; } .card:hover { transform: translateZ(30px) scale(1.02); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.15) inset; } .card:hover::before { opacity: 1; } .card:hover::after { opacity: 0.3; } .card:nth-child(1) { z-index: 3; } .card:nth-child(2) { z-index: 2; } .card:nth-child(3) { z-index: 1; } .card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; } .card-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 5px; color: #ffffff; position: relative; } .card-subtitle { font-size: 0.9rem; color: #8a8a9a; margin-bottom: 15px; } .product-tag { background: linear-gradient(90deg, #00d4ff20, #fa2cc620); color: #ccc; font-size: 0.7rem; padding: 4px 10px; border-radius: 20px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; border: 1px solid rgba(255, 255, 255, 0.1); } .card-content { display: flex; gap: 20px; align-items: center; position: relative; } .product-image { width: 120px; height: 120px; object-fit: cover; border-radius: 8px; transition: transform 0.5s ease; } .card:hover .product-image { transform: scale(1.05); } .product-info { flex: 1; } .product-description { font-size: 0.95rem; line-height: 1.5; color: #b0b0b0; margin-bottom: 15px; } .specs-container { overflow: hidden; max-height: 0; transition: max-height 0.6s cubic-bezier(0.23, 1, 0.32, 1); } .card:hover .specs-container { max-height: 200px; } .specs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 20px; margin-top: 15px; } .spec-item { display: flex; flex-direction: column; } .spec-label { font-size: 0.7rem; color: #8a8a9a; margin-bottom: 2px; text-transform: uppercase; } .spec-value { font-size: 0.85rem; color: #e0e0e0; font-weight: 500; } .view-more { background: rgba(255, 255, 255, 0.07); color: #00d4ff; border: none; padding: 8px 16px; border-radius: 6px; font-size: 0.85rem; margin-top: 15px; cursor: pointer; transition: all 0.3s ease; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; } .view-more:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-2px); } .view-more svg { transition: transform 0.3s ease; } .view-more:hover svg { transform: translateX(3px); } /* Badge on card */ .badge { position: absolute; top: -8px; right: -8px; background: linear-gradient(45deg, #00d4ff, #fa2cc6); color: white; font-size: 0.7rem; font-weight: 700; padding: 5px 10px; border-radius: 4px; z-index: 10; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); transform: rotate(5deg); } .glow-effect { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(0, 212, 255, 0.15) 0%, transparent 60%); opacity: 0; transition: opacity 0.3s ease; mix-blend-mode: screen; } .card:hover .glow-effect { opacity: 1; } @media (max-width: 500px) { .title-section h1 { font-size: 1.8rem; } .card-content { flex-direction: column; } .product-image { width: 100%; height: auto; margin-bottom: 15px; } .specs-grid { grid-template-columns: 1fr; } } </style> </head> <body> <div class="grid-overlay"></div> <div class="container"> <div class="title-section"> <h1>Quantum Edge Series</h1> <p>Explore our latest tech innovations with futuristic design and cutting-edge performance</p> </div> <div class="cards-container"> <div class="card" id="card1"> <div class="badge">NEW</div> <div class="card-header"> <div> <h2 class="card-title">NeoSync Pro XR5</h2> <div class="card-subtitle">Advanced Neural Interface System</div> <span class="product-tag">Quantum Computing</span> </div> </div> <div class="card-content"> <img src="https://images.unsplash.com/photo-1620712943543-bcc4688e7485?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3" alt="NeoSync Pro XR5" class="product-image"> <div class="product-info"> <p class="product-description">Our flagship neural processor featuring quantum tunneling architecture, enabling 8.7 petaFLOPS of computational throughput with zero latency response time.</p> <div class="specs-container"> <div class="specs-grid"> <div class="spec-item"> <span class="spec-label">Processing Units</span> <span class="spec-value">25,600 QPUs</span> </div> <div class="spec-item"> <span class="spec-label">Thermal Efficiency</span> <span class="spec-value">0.17W/TFLOP</span> </div> <div class="spec-item"> <span class="spec-label">Interface</span> <span class="spec-value">Neural Photonic</span> </div> <div class="spec-item"> <span class="spec-label">Dimensions</span> <span class="spec-value">86 x 112 x 15 mm</span> </div> </div> </div> <button class="view-more"> Technical specs <svg width="14" height="14" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M5 12H19M19 12L12 5M19 12L12 19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </button> </div> </div> <div class="glow-effect"></div> </div> <div class="card" id="card2"> <div class="card-header"> <div> <h2 class="card-title">HoloMatrix Display</h2> <div class="card-subtitle">Volumetric Light Field Technology</div> <span class="product-tag">Immersive Display</span> </div> </div> <div class="card-content"> <img src="https://images.unsplash.com/photo-1526406915894-7bcd65f60845?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3" alt="HoloMatrix Display" class="product-image"> <div class="product-info"> <p class="product-description">True 3D interactive hologram technology with 300° viewing angle and haptic feedback response, powered by our revolutionary photonic crystal substrate.</p> <div class="specs-container"> <div class="specs-grid"> <div class="spec-item"> <span class="spec-label">Resolution</span> <span class="spec-value">85K per cubic cm</span> </div> <div class="spec-item"> <span class="spec-label">Refresh Rate</span> <span class="spec-value">320 Hz voxel mapping</span> </div> <div class="spec-item"> <span class="spec-label">Luminance</span> <span class="spec-value">12,000 nits peak</span> </div> <div class="spec-item"> <span class="spec-label">Power Draw</span> <span class="spec-value">45W active / 0.5W idle</span> </div> </div> </div> <button class="view-more"> Technical specs <svg width="14" height="14" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M5 12H19M19 12L12 5M19 12L12 19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </button> </div> </div> <div class="glow-effect"></div> </div> <div class="card" id="card3"> <div class="card-header"> <div> <h2 class="card-title">Carbon Mesh Armor</h2> <div class="card-subtitle">Adaptive Nano-Carbon Protection</div> <span class="product-tag">Defense Tech</span> </div> </div> <div class="card-content"> <img src="https://images.unsplash.com/photo-1550745165-9bc0b252726f?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3" alt="Carbon Mesh Armor" class="product-image"> <div class="product-info"> <p class="product-description">Self-healing molecular structure with hyperdynamic nano-weave fibers that adapt to impact velocity. Integrates with our neural interface for real-time threat response.</p> <div class="specs-container"> <div class="specs-grid"> <div class="spec-item"> <span class="spec-label">Weight</span> <span class="spec-value">173g per m²</span> </div> <div class="spec-item"> <span class="spec-label">Impact Rating</span> <span class="spec-value">Level VII+</span> </div> <div class="spec-item"> <span class="spec-label">Response Time</span> <span class="spec-value">0.0034 milliseconds</span> </div> <div class="spec-item"> <span class="spec-label">Battery Life</span> <span class="spec-value">120 hours active</span> </div> </div> </div> <button class="view-more"> Technical specs <svg width="14" height="14" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M5 12H19M19 12L12 5M19 12L12 19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </button> </div> </div> <div class="glow-effect"></div> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', () => { // 3D card effect based on mouse position const cards = document.querySelectorAll('.card'); cards.forEach(card => { card.addEventListener('mousemove', e => { const rect = card.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; const centerX = rect.width / 2; const centerY = rect.height / 2; const rotateX = (y - centerY) / 20; const rotateY = (centerX - x) / 20; card.style.transform = `perspective(1000px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) translateZ(30px) scale(1.02)`; // Update glow effect position card.style.setProperty('--mouse-x', `${x}px`); card.style.setProperty('--mouse-y', `${y}px`); }); card.addEventListener('mouseleave', () => { card.style.transform = 'perspective(1000px) rotateX(0) rotateY(0) translateZ(0) scale(1)'; }); }); // Prevent actual form submission const buttons = document.querySelectorAll('.view-more'); buttons.forEach(button => { button.addEventListener('click', (e) => { e.preventDefault(); const card = e.target.closest('.card'); const specsContainer = card.querySelector('.specs-container'); // Toggle the specs with animation if (specsContainer.style.maxHeight === '200px') { specsContainer.style.maxHeight = '0'; } else { specsContainer.style.maxHeight = '200px'; } }); }); // Add staggered entrance animation cards.forEach((card, index) => { card.style.opacity = '0'; card.style.transform = 'translateY(30px)'; card.style.transition = 'opacity 0.5s ease, transform 0.5s ease'; setTimeout(() => { card.style.opacity = '1'; card.style.transform = 'translateY(0)'; }, 200 + (index * 150)); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Social Stack Dashboard</title> <style> :root { --primary-gradient: linear-gradient(135deg, #6A11CB 0%, #2575FC 100%); --secondary-gradient: linear-gradient(135deg, #FF416C 0%, #FF4B2B 100%); --tertiary-gradient: linear-gradient(135deg, #FAACA8 0%, #DDD6F3 100%); --accent-gradient: linear-gradient(135deg, #13F1FC 0%, #0470DC 100%); --dark-gradient: linear-gradient(135deg, #30122b 0%, #1e1834 100%); --font-heading: 'Poppins', sans-serif; --font-body: 'Inter', sans-serif; --card-radius: 16px; --shadow-strong: 0 10px 30px rgba(0, 0, 0, 0.2); --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.1); --transition-bounce: cubic-bezier(0.175, 0.885, 0.32, 1.275); --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1); } * { margin: 0; padding: 0; box-sizing: border-box; font-family: var(--font-body); } @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@500;600;700&display=swap'); body { background-color: #f8f9fa; display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 1rem; overflow-x: hidden; background: #0f0f1a; color: white; } .dashboard { width: 100%; max-width: 680px; height: 680px; position: relative; overflow: hidden; border-radius: 24px; padding: 1.5rem; background: var(--dark-gradient); } .header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; } .header h1 { font-family: var(--font-heading); font-weight: 700; font-size: 1.75rem; background: var(--primary-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; } .header-controls { display: flex; gap: 0.75rem; } .header-btn { background: rgba(255, 255, 255, 0.1); border: none; border-radius: 50%; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s var(--transition-smooth); color: white; } .header-btn:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-2px); } .card-stack { position: relative; height: calc(100% - 70px); perspective: 2000px; } .card { position: absolute; width: 100%; height: auto; min-height: 160px; padding: 1.5rem; border-radius: var(--card-radius); color: white; box-shadow: var(--shadow-strong); cursor: grab; transform-origin: center center; transition: transform 0.5s var(--transition-bounce), opacity 0.3s var(--transition-smooth), box-shadow 0.3s var(--transition-smooth); overflow: hidden; user-select: none; } .card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.05); opacity: 0; transition: opacity 0.3s var(--transition-smooth); z-index: 1; pointer-events: none; } .card.active::before { opacity: 1; } .card.dragging { cursor: grabbing; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); z-index: 1000 !important; } .card.dragging::after { content: ''; position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; background: white; border-radius: 50%; animation: pulse 1.5s infinite; } @keyframes pulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: 0.7; } 100% { transform: scale(1); opacity: 1; } } .card:nth-child(1) { background: var(--primary-gradient); z-index: 5; } .card:nth-child(2) { background: var(--secondary-gradient); z-index: 4; } .card:nth-child(3) { background: var(--tertiary-gradient); z-index: 3; color: #333; } .card:nth-child(4) { background: var(--accent-gradient); z-index: 2; } .card:nth-child(5) { background: linear-gradient(135deg, #C33764 0%, #1D2671 100%); z-index: 1; } .card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; } .card-title { font-family: var(--font-heading); font-weight: 600; font-size: 1.2rem; letter-spacing: -0.02em; } .card:nth-child(3) .card-title, .card:nth-child(3) .card-value, .card:nth-child(3) .card-label { color: #333; } .platform-icon { width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); display: flex; align-items: center; justify-content: center; } .card:nth-child(3) .platform-icon { background: rgba(0, 0, 0, 0.1); } .card-metrics { display: flex; gap: 1.5rem; margin-top: 1rem; } .metric { flex: 1; } .card-value { font-size: 1.8rem; font-weight: 700; margin-bottom: 0.25rem; } .card-label { font-size: 0.85rem; opacity: 0.8; } .sparkline { height: 40px; width: 100%; margin-top: 1rem; position: relative; } .sparkline-line { fill: none; stroke: rgba(255, 255, 255, 0.8); stroke-width: 2; stroke-linecap: round; } .card:nth-child(3) .sparkline-line { stroke: rgba(0, 0, 0, 0.5); } .sparkline-area { fill: rgba(255, 255, 255, 0.1); } .card:nth-child(3) .sparkline-area { fill: rgba(0, 0, 0, 0.05); } .sparkline-dot { fill: white; } .card:nth-child(3) .sparkline-dot { fill: #333; } .card-help-text { font-size: 0.8rem; opacity: 0.7; margin-top: 0.5rem; max-width: 80%; } .trend { display: inline-flex; align-items: center; padding: 0.25rem 0.5rem; border-radius: 100px; font-size: 0.8rem; font-weight: 600; margin-left: 0.5rem; } .trend-up { background: rgba(0, 255, 0, 0.15); color: #90ee90; } .trend-down { background: rgba(255, 0, 0, 0.15); color: #ff8080; } .card:nth-child(3) .trend-up { background: rgba(0, 128, 0, 0.1); color: #008000; } .card:nth-child(3) .trend-down { background: rgba(255, 0, 0, 0.1); color: #ff0000; } .connection-dots { position: absolute; pointer-events: none; z-index: 10; top: 0; left: 0; width: 100%; height: 100%; } .connection-line { stroke: rgba(255, 255, 255, 0.2); stroke-width: 1.5; stroke-dasharray: 5, 5; fill: none; } .drag-indicator { position: absolute; top: 1rem; right: 1rem; display: flex; flex-direction: column; gap: 3px; opacity: 0.6; transition: opacity 0.2s ease; } .drag-indicator span { width: 20px; height: 3px; background: currentColor; border-radius: 3px; } .card:hover .drag-indicator { opacity: 1; } .add-card-btn { position: absolute; bottom: 1.5rem; right: 1.5rem; width: 50px; height: 50px; border-radius: 50%; background: var(--primary-gradient); border: none; color: white; font-size: 1.5rem; cursor: pointer; box-shadow: var(--shadow-strong); transition: transform 0.3s var(--transition-bounce), box-shadow 0.3s var(--transition-smooth); z-index: 100; display: flex; align-items: center; justify-content: center; } .add-card-btn:hover { transform: translateY(-3px); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3); } @media (max-width: 600px) { .dashboard { padding: 1rem; } .header h1 { font-size: 1.5rem; } .card { padding: 1.25rem; min-height: 150px; } .card-value { font-size: 1.5rem; } .card-metrics { flex-direction: column; gap: 0.75rem; } } .shake-animation { animation: shake 0.4s var(--transition-bounce); } @keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-5px) rotate(-1deg); } 40% { transform: translateX(5px) rotate(1deg); } 60% { transform: translateX(-3px) rotate(-0.5deg); } 80% { transform: translateX(3px) rotate(0.5deg); } } .tooltip { position: absolute; background: #fff; color: #333; padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.85rem; box-shadow: var(--shadow-light); pointer-events: none; opacity: 0; transition: opacity 0.2s ease, transform 0.2s ease; transform: translateY(10px); z-index: 1000; text-align: center; white-space: nowrap; } .tooltip.show { opacity: 1; transform: translateY(0); } .instructions { position: absolute; top: 0.75rem; left: 50%; transform: translateX(-50%); background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(8px); border-radius: 8px; padding: 0.5rem 1rem; font-size: 0.8rem; opacity: 0.8; pointer-events: none; transition: opacity 0.5s ease; z-index: 10; } .instructions.fade { opacity: 0; } </style> </head> <body> <div class="dashboard"> <div class="header"> <h1>SocialStack</h1> <div class="header-controls"> <button class="header-btn refresh-btn"> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M2 12C2 6.48 6.48 2 12 2C17.52 2 22 6.48 22 12C22 17.52 17.52 22 12 22" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M8 16H2V22" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M2 12C2 6.48 6.48 2 12 2" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="30,30" stroke-dashoffset="0"> <animate attributeName="stroke-dashoffset" values="0;30" dur="0.5s" begin="refreshStart.begin" fill="freeze" /> </path> </svg> </button> <button class="header-btn settings-btn"> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M19.4 15C19.2669 15.3016 19.2272 15.6362 19.286 15.9606C19.3448 16.285 19.4995 16.5843 19.73 16.82L19.79 16.88C19.976 17.0657 20.1235 17.2863 20.2241 17.5291C20.3248 17.7719 20.3766 18.0322 20.3766 18.295C20.3766 18.5578 20.3248 18.8181 20.2241 19.0609C20.1235 19.3037 19.976 19.5243 19.79 19.71C19.6043 19.896 19.3837 20.0435 19.1409 20.1441C18.8981 20.2448 18.6378 20.2966 18.375 20.2966C18.1122 20.2966 17.8519 20.2448 17.6091 20.1441C17.3663 20.0435 17.1457 19.896 16.96 19.71L16.9 19.65C16.6643 19.4195 16.365 19.2648 16.0406 19.206C15.7162 19.1472 15.3816 19.1869 15.08 19.32C14.7842 19.4468 14.532 19.6572 14.3543 19.9255C14.1766 20.1938 14.0813 20.5082 14.08 20.83V21C14.08 21.5304 13.8693 22.0391 13.4942 22.4142C13.1191 22.7893 12.6104 23 12.08 23C11.5496 23 11.0409 22.7893 10.6658 22.4142C10.2907 22.0391 10.08 21.5304 10.08 21V20.91C10.0723 20.579 9.96512 20.258 9.77251 19.9887C9.5799 19.7194 9.31074 19.5143 9 19.4C8.69838 19.2669 8.36381 19.2272 8.03941 19.286C7.71502 19.3448 7.41568 19.4995 7.18 19.73L7.12 19.79C6.93425 19.976 6.71368 20.1235 6.47088 20.2241C6.22808 20.3248 5.96783 20.3766 5.705 20.3766C5.44217 20.3766 5.18192 20.3248 4.93912 20.2241C4.69632 20.1235 4.47575 19.976 4.29 19.79C4.10405 19.6043 3.95653 19.3837 3.85588 19.1409C3.75523 18.8981 3.70343 18.6378 3.70343 18.375C3.70343 18.1122 3.75523 17.8519 3.85588 17.6091C3.95653 17.3663 4.10405 17.1457 4.29 16.96L4.35 16.9C4.58054 16.6643 4.73519 16.365 4.794 16.0406C4.85282 15.7162 4.81312 15.3816 4.68 15.08C4.55324 14.7842 4.34276 14.532 4.07447 14.3543C3.80618 14.1766 3.49179 14.0813 3.17 14.08H3C2.46957 14.08 1.96086 13.8693 1.58579 13.4942C1.21071 13.1191 1 12.6104 1 12.08C1 11.5496 1.21071 11.0409 1.58579 10.6658C1.96086 10.2907 2.46957 10.08 3 10.08H3.09C3.42099 10.0723 3.742 9.96512 4.0113 9.77251C4.28059 9.5799 4.48572 9.31074 4.6 9C4.73312 8.69838 4.77282 8.36381 4.714 8.03941C4.65519 7.71502 4.50054 7.41568 4.27 7.18L4.21 7.12C4.02405 6.93425 3.87653 6.71368 3.77588 6.47088C3.67523 6.22808 3.62343 5.96783 3.62343 5.705C3.62343 5.44217 3.67523 5.18192 3.77588 4.93912C3.87653 4.69632 4.02405 4.47575 4.21 4.29C4.39575 4.10405 4.61632 3.95653 4.85912 3.85588C5.10192 3.75523 5.36217 3.70343 5.625 3.70343C5.88783 3.70343 6.14808 3.75523 6.39088 3.85588C6.63368 3.95653 6.85425 4.10405 7.04 4.29L7.1 4.35C7.33568 4.58054 7.63502 4.73519 7.95941 4.794C8.28381 4.85282 8.61838 4.81312 8.92 4.68H9C9.29577 4.55324 9.54802 4.34276 9.72569 4.07447C9.90337 3.80618 9.99872 3.49179 10 3.17V3C10 2.46957 10.2107 1.96086 10.5858 1.58579C10.9609 1.21071 11.4696 1 12 1C12.5304 1 13.0391 1.21071 13.4142 1.58579C13.7893 1.96086 14 2.46957 14 3V3.09C14.0013 3.41179 14.0966 3.72618 14.2743 3.99447C14.452 4.26276 14.7042 4.47324 15 4.6C15.3016 4.73312 15.6362 4.77282 15.9606 4.714C16.285 4.65519 16.5843 4.50054 16.82 4.27L16.88 4.21C17.0657 4.02405 17.2863 3.87653 17.5291 3.77588C17.7719 3.67523 18.0322 3.62343 18.295 3.62343C18.5578 3.62343 18.8181 3.67523 19.0609 3.77588C19.3037 3.87653 19.5243 4.02405 19.71 4.21C19.896 4.39575 20.0435 4.61632 20.1441 4.85912C20.2448 5.10192 20.2966 5.36217 20.2966 5.625C20.2966 5.88783 20.2448 6.14808 20.1441 6.39088C20.0435 6.63368 19.896 6.85425 19.71 7.04L19.65 7.1C19.4195 7.33568 19.2648 7.63502 19.206 7.95941C19.1472 8.28381 19.1869 8.61838 19.32 8.92V9C19.4468 9.29577 19.6572 9.54802 19.9255 9.72569C20.1938 9.90337 20.5082 9.99872 20.83 10H21C21.5304 10 22.0391 10.2107 22.4142 10.5858C22.7893 10.9609 23 11.4696 23 12C23 12.5304 22.7893 13.0391 22.4142 13.4142C22.0391 13.7893 21.5304 14 21 14H20.91C20.5882 14.0013 20.2738 14.0966 20.0055 14.2743C19.7372 14.452 19.5268 14.7042 19.4 15Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </button> </div> </div> <div class="instructions">Drag cards to reposition • Tap twice to expand • Stack to connect</div> <svg class="connection-dots" viewBox="0 0 700 600" xmlns="http://www.w3.org/2000/svg"> <!-- Connection lines will be added here dynamically --> </svg> <div class="card-stack"> <!-- Instagram Card --> <div class="card" data-id="instagram"> <div class="drag-indicator"> <span></span> <span></span> </div> <div class="card-header"> <h3 class="card-title">Instagram Insights</h3> <div class="platform-icon"> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M17 2H7C4.23858 2 2 4.23858 2 7V17C2 19.7614 4.23858 22 7 22H17C19.7614 22 22 19.7614 22 17V7C22 4.23858 19.7614 2 17 2Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M16 11.37C16.1234 12.2022 15.9813 13.0522 15.5938 13.799C15.2063 14.5458 14.5932 15.1514 13.8416 15.5297C13.0901 15.9079 12.2385 16.0396 11.4078 15.9059C10.5771 15.7723 9.80977 15.3801 9.21485 14.7852C8.61993 14.1902 8.22774 13.4229 8.09408 12.5922C7.96042 11.7615 8.09208 10.9099 8.47034 10.1584C8.8486 9.40685 9.4542 8.79374 10.201 8.40624C10.9478 8.01874 11.7978 7.87659 12.63 8C13.4789 8.12588 14.2649 8.52146 14.8717 9.1283C15.4785 9.73515 15.8741 10.5211 16 11.37Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M17.5 6.5H17.51" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </div> </div> <div class="card-metrics"> <div class="metric"> <div class="card-value">38.2K <span class="trend trend-up">+12%</span></div> <div class="card-label">Followers</div> </div> <div class="metric"> <div class="card-value">4.8K</div> <div class="card-label">Weekly Engagement</div> </div> </div> <div class="sparkline"> <svg width="100%" height="100%" viewBox="0 0 300 60" preserveAspectRatio="none"> <path class="sparkline-area" d="M0,60 L0,50 C10,48 20,45 30,40 C40,35 50,20 60,15 C70,10 80,12 90,25 C100,38 110,45 120,40 C130,35 140,25 150,20 C160,15 170,10 180,15 C190,20 200,30 210,35 C220,40 230,38 240,30 C250,22 260,12 270,8 C280,4 290,2 300,5 L300,60 Z"></path> <path class="sparkline-line" d="M0,50 C10,48 20,45 30,40 C40,35 50,20 60,15 C70,10 80,12 90,25 C100,38 110,45 120,40 C130,35 140,25 150,20 C160,15 170,10 180,15 C190,20 200,30 210,35 C220,40 230,38 240,30 C250,22 260,12 270,8 C280,4 290,2 300,5"></path> <circle class="sparkline-dot" cx="300" cy="5" r="4"></circle> </svg> </div> <div class="card-help-text">Reach increased by 18% with video content</div> </div> <!-- Twitter Card --> <div class="card" data-id="twitter"> <div class="drag-indicator"> <span></span> <span></span> </div> <div class="card-header"> <h3 class="card-title">Twitter Analytics</h3> <div class="platform-icon"> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M23 3C22.0424 3.67548 20.9821 4.19211 19.86 4.53C19.2577 3.83751 18.4573 3.34669 17.567 3.12393C16.6767 2.90116 15.7395 2.9572 14.8821 3.28445C14.0247 3.61171 13.2884 4.1944 12.773 4.95372C12.2575 5.71303 11.9877 6.61234 12 7.53V8.53C10.2426 8.57557 8.50127 8.18581 6.93101 7.39545C5.36074 6.60508 4.01032 5.43864 3 4C3 4 -1 13 8 17C5.94053 18.398 3.48716 19.0989 1 19C10 24 21 19 21 7.5C20.9991 7.22145 20.9723 6.94359 20.92 6.67C21.9406 5.66349 22.6608 4.39271 23 3V3Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </div> </div> <div class="card-metrics"> <div class="metric"> <div class="card-value">24.7K <span class="trend trend-down">-3%</span></div> <div class="card-label">Followers</div> </div> <div class="metric"> <div class="card-value">185</div> <div class="card-label">Daily Mentions</div> </div> </div> <div class="sparkline"> <svg width="100%" height="100%" viewBox="0 0 300 60" preserveAspectRatio="none"> <path class="sparkline-area" d="M0,60 L0,30 C10,32 20,40 30,38 C40,36 50,20 60,18 C70,16 80,25 90,30 C100,35 110,32 120,28 C130,24 140,22 150,25 C160,28 170,35 180,32 C190,29 200,20 210,18 C220,16 230,22 240,28 C250,34 260,38 270,35 C280,32 290,25 300,22 L300,60 Z"></path> <path class="sparkline-line" d="M0,30 C10,32 20,40 30,38 C40,36 50,20 60,18 C70,16 80,25 90,30 C100,35 110,32 120,28 C130,24 140,22 150,25 C160,28 170,35 180,32 C190,29 200,20 210,18 C220,16 230,22 240,28 C250,34 260,38 270,35 C280,32 290,25 300,22"></path> <circle class="sparkline-dot" cx="300" cy="22" r="4"></circle> </svg> </div> <div class="card-help-text">Trending hashtag: #TechTuesday (+250% engagement)</div> </div> <!-- LinkedIn Card --> <div class="card" data-id="linkedin"> <div class="drag-indicator"> <span></span> <span></span> </div> <div class="card-header"> <h3 class="card-title">LinkedIn Network</h3> <div class="platform-icon"> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M16 8C17.5913 8 19.1174 8.63214 20.2426 9.75736C21.3679 10.8826 22 12.4087 22 14V21H18V14C18 13.4696 17.7893 12.9609 17.4142 12.5858C17.0391 12.2107 16.5304 12 16 12C15.4696 12 14.9609 12.2107 14.5858 12.5858C14.2107 12.9609 14 13.4696 14 14V21H10V14C10 12.4087 10.6321 10.8826 11.7574 9.75736C12.8826 8.63214 14.4087 8 16 8Z" stroke="#333" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M6 9H2V21H6V9Z" stroke="#333" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M4 6C5.10457 6 6 5.10457 6 4C6 2.89543 5.10457 2 4 2C2.89543 2 2 2.89543 2 4C2 5.10457 2.89543 6 4 6Z" stroke="#333" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </div> </div> <div class="card-metrics"> <div class="metric"> <div class="card-value">5.2K <span class="trend trend-up">+8%</span></div> <div class="card-label">Connections</div> </div> <div class="metric"> <div class="card-value">76%</div> <div class="card-label">Profile Visibility</div> </div> </div> <div class="sparkline"> <svg width="100%" height="100%" viewBox="0 0 300 60" preserveAspectRatio="none"> <path class="sparkline-area" d="M0,60 L0,40 C10,38 20,36 30,34 C40,32 50,30 60,28 C70,26 80,25 90,22 C100,19 110,18 120,15 C130,12 140,10 150,12 C160,14 170,20 180,18 C190,16 200,12 210,10 C220,8 230,8 240,10 C250,12 260,16 270,15 C280,14 290,12 300,10 L300,60 Z"></path> <path class="sparkline-line" d="M0,40 C10,38 20,36 30,34 C40,32 50,30 60,28 C70,26 80,25 90,22 C100,19 110,18 120,15 C130,12 140,10 150,12 C160,
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>TasteTrek - Restaurant Reviews</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Montserrat', sans-serif; } :root { --bg-color: #f7f3e9; --primary: #d64b2a; --secondary: #2a5d7c; --accent: #f9c22e; --text-dark: #2c3e50; --text-light: #ecf0f1; --shadow: rgba(0, 0, 0, 0.2); } body { background-color: var(--bg-color); background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%232a5d7c' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E"); display: flex; justify-content: center; align-items: center; min-height: 700px; width: 100%; overflow-x: hidden; perspective: 1000px; } .container { width: 100%; max-width: 700px; padding: 20px; height: 660px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--primary) var(--bg-color); } .container::-webkit-scrollbar { width: 6px; } .container::-webkit-scrollbar-track { background: var(--bg-color); } .container::-webkit-scrollbar-thumb { background-color: var(--primary); border-radius: 10px; } header { margin-bottom: 30px; text-align: center; position: relative; } h1 { font-size: 2.5rem; color: var(--text-dark); margin-bottom: 10px; font-weight: 700; position: relative; display: inline-block; } h1::after { content: ""; position: absolute; bottom: -8px; left: 10%; width: 80%; height: 3px; background: var(--primary); border-radius: 2px; } h1 span { color: var(--primary); } .subtitle { color: var(--secondary); font-size: 1rem; font-weight: 500; margin-bottom: 5px; } .search-bar { position: relative; margin: 20px auto; max-width: 500px; } .search-bar input { width: 100%; padding: 12px 50px 12px 20px; border: none; border-radius: 30px; box-shadow: 0 4px 15px var(--shadow); font-size: 1rem; background-color: white; transition: all 0.3s ease; outline: none; } .search-bar input:focus { box-shadow: 0 6px 20px rgba(214, 75, 42, 0.3); } .search-bar button { position: absolute; right: 5px; top: 5px; background: var(--primary); border: none; border-radius: 50%; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s ease; } .search-bar button:hover { background: var(--secondary); } .search-bar svg { width: 18px; height: 18px; fill: white; } .card-stack { position: relative; margin-bottom: 80px; } .card { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); margin-bottom: 30px; position: relative; transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1); transform-style: preserve-3d; } .card:hover { transform: translateY(-15px) rotateX(5deg); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2); } .card:hover .card-background { transform: translateZ(-20px); } .card:hover .card-details { transform: translateZ(30px); } .card:hover .review-details { opacity: 1; height: auto; max-height: 500px; padding: 20px; } .card-background { height: 200px; background-size: cover; background-position: center; position: relative; transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1); } .card-background::after { content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 50%; background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent); } .card-details { padding: 20px; position: relative; z-index: 2; transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1); background: white; } .card-title { font-size: 1.5rem; font-weight: 700; color: var(--text-dark); margin-bottom: 5px; display: flex; justify-content: space-between; align-items: center; } .restaurant-type { display: inline-block; font-size: 0.85rem; font-weight: 500; color: var(--text-light); background: var(--secondary); padding: 5px 10px; border-radius: 20px; } .rating { display: flex; align-items: center; margin: 10px 0; } .stars { display: flex; margin-right: 10px; } .star { color: var(--accent); margin-right: 2px; } .review-count { font-size: 0.9rem; color: var(--text-dark); opacity: 0.7; } .price-range { font-size: 0.9rem; color: var(--text-dark); opacity: 0.8; margin-bottom: 10px; } .neighborhood { font-size: 0.9rem; color: var(--primary); margin-bottom: 15px; display: flex; align-items: center; } .neighborhood svg { width: 14px; height: 14px; margin-right: 5px; fill: var(--primary); } .tags { display: flex; flex-wrap: wrap; margin-bottom: 15px; gap: 8px; } .tag { font-size: 0.8rem; background-color: #f0f0f0; color: var(--text-dark); padding: 5px 10px; border-radius: 15px; transition: all 0.3s ease; } .tag:hover { background-color: var(--accent); color: var(--text-dark); transform: scale(1.05); } .review-details { opacity: 0; height: 0; max-height: 0; overflow: hidden; transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1); border-top: 1px dashed #eaeaea; padding: 0 20px; } .review { margin-bottom: 20px; } .review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; } .reviewer { font-weight: 600; font-size: 0.95rem; color: var(--text-dark); } .review-date { font-size: 0.8rem; color: var(--text-dark); opacity: 0.6; } .review-text { font-size: 0.9rem; line-height: 1.5; color: var(--text-dark); } .view-more { display: inline-block; margin-top: 10px; color: var(--primary); font-weight: 600; font-size: 0.9rem; text-decoration: none; position: relative; cursor: pointer; } .view-more::after { content: ""; position: absolute; width: 100%; height: 2px; bottom: -2px; left: 0; background-color: var(--primary); transform: scaleX(0); transform-origin: right; transition: transform 0.3s ease; } .view-more:hover::after { transform: scaleX(1); transform-origin: left; } .special-tag { background: linear-gradient(45deg, var(--primary), var(--accent)); color: white; font-weight: 500; } .logo-small { width: 35px; height: 35px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem; margin-right: 10px; } .filter-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; } .filter-group { display: flex; gap: 10px; flex-wrap: wrap; } .filter-btn { padding: 8px 15px; background: white; border: 1px solid #e0e0e0; border-radius: 30px; font-size: 0.85rem; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; gap: 5px; } .filter-btn:hover, .filter-btn.active { background: var(--secondary); color: white; border-color: var(--secondary); } .filter-btn svg { width: 12px; height: 12px; fill: currentColor; } .card-spotlight { position: absolute; width: 200%; height: 200%; top: -50%; left: -50%; background: radial-gradient( circle at center, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 80% ); opacity: 0; transition: opacity 0.3s ease; pointer-events: none; } .menu-preview { margin-top: 15px; color: var(--text-dark); font-size: 0.9rem; font-weight: 500; } .menu-items { display: flex; margin-top: 10px; gap: 10px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--primary) transparent; padding-bottom: 10px; } .menu-items::-webkit-scrollbar { height: 4px; } .menu-items::-webkit-scrollbar-track { background: transparent; } .menu-items::-webkit-scrollbar-thumb { background-color: var(--primary); border-radius: 4px; } .menu-item { background: #f9f9f9; border-radius: 8px; padding: 8px 12px; min-width: 120px; text-align: center; font-size: 0.85rem; border: 1px solid #eee; transition: all 0.3s ease; cursor: pointer; } .menu-item:hover { background: #f0f0f0; transform: translateY(-2px); } .menu-item-price { font-weight: 600; color: var(--primary); margin-top: 3px; } .empty-placeholder { display: none; text-align: center; padding: 40px 20px; background: white; border-radius: 12px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); } .empty-placeholder h3 { color: var(--text-dark); margin-bottom: 10px; } .empty-placeholder p { color: var(--text-dark); opacity: 0.7; margin-bottom: 20px; } .empty-btn { background: var(--primary); color: white; border: none; padding: 10px 20px; border-radius: 30px; cursor: pointer; font-weight: 500; transition: all 0.3s ease; } .empty-btn:hover { background: var(--secondary); transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); } .logo-header { display: flex; align-items: center; justify-content: center; } .fade-in { animation: fadeIn 0.5s ease forwards; } @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } /* Responsive */ @media (max-width: 600px) { h1 { font-size: 2rem; } .subtitle { font-size: 0.9rem; } .card-title { font-size: 1.3rem; flex-direction: column; align-items: flex-start; gap: 5px; } .filter-bar { flex-direction: column; align-items: flex-start; } .card-background { height: 150px; } } </style> </head> <body> <div class="container"> <header> <div class="logo-header"> <div class="logo-small">TT</div> <h1>Taste<span>Trek</span></h1> </div> <p class="subtitle">Discover memorable dining experiences in your neighborhood</p> <div class="search-bar"> <input type="text" placeholder="Search restaurants, cuisines, or dishes..." aria-label="Search restaurants"> <button aria-label="Search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path> </svg> </button> </div> </header> <div class="filter-bar"> <div class="filter-group"> <button class="filter-btn active">All</button> <button class="filter-btn">Italian</button> <button class="filter-btn">Japanese</button> <button class="filter-btn">American</button> </div> <div class="filter-group"> <button class="filter-btn"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <path d="M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"></path> </svg> Filter </button> <button class="filter-btn"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <path d="M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"></path> </svg> Sort: Rating </button> </div> </div> <div class="card-stack"> <!-- Card 1 --> <div class="card fade-in"> <div class="card-spotlight"></div> <div class="card-background" style="background-image: url('https://images.unsplash.com/photo-1564759298141-cef86f51d4d4?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80');"></div> <div class="card-details"> <div class="card-title"> <span>Olive & Thyme</span> <span class="restaurant-type">Italian</span> </div> <div class="rating"> <div class="stars"> <span class="star">★</span> <span class="star">★</span> <span class="star">★</span> <span class="star">★</span> <span class="star" style="opacity:0.3">★</span> </div> <span class="review-count">127 reviews</span> </div> <div class="price-range">$$$ • Italian, Mediterranean</div> <div class="neighborhood"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path> </svg> Little Italy, Downtown </div> <div class="tags"> <span class="tag special-tag">Chef's Table</span> <span class="tag">Outdoor Seating</span> <span class="tag">Wine Selection</span> <span class="tag">Pasta</span> </div> <div class="menu-preview">Popular dishes:</div> <div class="menu-items"> <div class="menu-item"> <div>Truffle Risotto</div> <div class="menu-item-price">$24</div> </div> <div class="menu-item"> <div>Seafood Linguine</div> <div class="menu-item-price">$28</div> </div> <div class="menu-item"> <div>Osso Buco</div> <div class="menu-item-price">$32</div> </div> <div class="menu-item"> <div>Tiramisu</div> <div class="menu-item-price">$12</div> </div> </div> </div> <div class="review-details"> <div class="review"> <div class="review-header"> <span class="reviewer">Sarah T.</span> <span class="review-date">2 days ago</span> </div> <div class="review-text">"The ambiance transports you straight to the Italian countryside. Chef Marco's truffle risotto is genuinely transcendent – perfectly creamy with earthy notes that linger. Service was attentive without being intrusive. Worth every penny!"</div> </div> <div class="review"> <div class="review-header"> <span class="reviewer">Michael K.</span> <span class="review-date">1 week ago</span> </div> <div class="review-text">"Seafood linguine was swimming with fresh clams and prawns. The homemade pasta had that perfect bite. Wine pairing suggestion from our server was spot on. My only complaint is that I couldn't fit dessert!"</div> </div> <span class="view-more">Read all 127 reviews</span> </div> </div> <!-- Card 2 --> <div class="card fade-in" style="animation-delay: 0.2s;"> <div class="card-spotlight"></div> <div class="card-background" style="background-image: url('https://images.unsplash.com/photo-1602273660127-a0000560a4c1?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80');"></div> <div class="card-details"> <div class="card-title"> <span>Kiyoshi Sushi</span> <span class="restaurant-type">Japanese</span> </div> <div class="rating"> <div class="stars"> <span class="star">★</span> <span class="star">★</span> <span class="star">★</span> <span class="star">★</span> <span class="star">★</span> </div> <span class="review-count">205 reviews</span> </div> <div class="price-range">$$$$ • Japanese, Sushi</div> <div class="neighborhood"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path> </svg> Marina District </div> <div class="tags"> <span class="tag special-tag">Omakase</span> <span class="tag">Fresh Fish</span> <span class="tag">Sake Selection</span> <span class="tag">Private Room</span> </div> <div class="menu-preview">Popular dishes:</div> <div class="menu-items"> <div class="menu-item"> <div>Toro Nigiri</div> <div class="menu-item-price">$18</div> </div> <div class="menu-item"> <div>Omakase Set</div> <div class="menu-item-price">$120</div> </div> <div class="menu-item"> <div>Wagyu Roll</div> <div class="menu-item-price">$32</div> </div> <div class="menu-item"> <div>Matcha Cheesecake</div> <div class="menu-item-price">$14</div> </div> </div> </div> <div class="review-details"> <div class="review"> <div class="review-header"> <span class="reviewer">David L.</span> <span class="review-date">3 days ago</span> </div> <div class="review-text">"Chef Tanaka's omakase experience is unparalleled in the city. The progression of flavors was thoughtfully curated, with each piece of nigiri more impressive than the last. The toro literally melts in your mouth. Reserve well in advance – this place is deservedly popular."</div> </div> <div class="review"> <div class="review-header"> <span class="reviewer">Emily J.</span> <span class="review-date">2 weeks ago</span> </div> <div class="review-text">"The attention to detail here is extraordinary. From the hand-grated fresh wasabi to the perfectly seasoned rice, everything is done with precision. The sake pairing option is worth the splurge. A truly authentic Japanese dining experience."</div> </div> <span class="view-more">Read all 205 reviews</span> </div> </div> <!-- Card 3 --> <div class="card fade-in" style="animation-delay: 0.4s;"> <div class="card-spotlight"></div> <div class="card-background" style="background-image: url('https://images.unsplash.com/photo-1514933651103-005eec06c04b?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80');"></div> <div class="card-details"> <div class="card-title"> <span>Rustic Table</span> <span class="restaurant-type">American</span> </div> <div class="rating"> <div class="stars"> <span class="star">★</span> <span class="star">★</span> <span class="star">★</span> <span class="star">★</span> <span class="star" style="opacity:0.3">★</span> </div> <span class="review-count">178 reviews</span> </div> <div class="price-range">$$ • American, Farm-to-Table</div> <div class="neighborhood"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path> </svg> Highland Park </div> <div class="tags"> <span class="tag special-tag">Farm-to-Table</span> <span class="tag">Brunch Favorite</span> <span class="tag">Craft Cocktails</span> <span class="tag">Locally Sourced</span> </div> <div class="menu-preview">Popular dishes:</div> <div class="menu-items"> <div class="menu-item"> <div>Buttermilk Chicken</div> <div class="menu-item-price">$22</div> </div> <div class="menu-item"> <div>Grass-fed Burger</div> <div class="menu-item-price">$19</div> </div> <div class="menu-item"> <div>Seasonal Harvest Bowl</div> <div class="menu-item-price">$17</div> </div> <div class="menu-item"> <div>Apple Crumble</div> <div class="menu-item-price">$10</div> </div> </div> </div> <div class="review-details"> <div class="review"> <div class="review-header"> <span class="reviewer">Jessica M.</span> <span class="review-date">5 days ago</span> </div> <div class="review-text">"The buttermilk chicken changed my life! Chef Amy sources everything from farms within 50 miles, and you can taste the difference. Their seasonal cocktails are inventive - try the blackberry sage smash. Cozy atmosphere perfect for date night or catching up with friends."</div> </div> <div class="review"> <div class="review-header"> <span class="reviewer">Robert G.</span> <span class="review-date">2 weeks ago</span> </div> <div class="review-text">"A neighborhood gem that truly embraces the farm-to-table ethos. The menu changes frequently based on what's fresh, but the grass-fed burger is a mainstay for good reason. Their house-made pickles and condiments elevate everything. Brunch here is worth the wait."</div> </div> <span class="view-more">Read all 178 reviews</span> </div> </div> </div> <div class="empty-placeholder"> <h3>No restaurants found</h3> <p>Try adjusting your search or filters to find what you're looking for.</p> <button class="empty-btn">Clear all filters</button> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Parallax effect for cards const cards = document.querySelectorAll('.card'); cards.forEach(card => { const background = card.querySelector('.card-background'); const details = card.querySelector('.card-details'); const spotlight = card.querySelector('.card-spotlight'); card.addEventListener('mousemove', (e) => { const cardRect = card.getBoundingClientRect(); const x = e.clientX - cardRect.left; const y = e.clientY - cardRect.top; // Calculate rotation based on mouse position const rotateY = (x / cardRect.width - 0.5) * 10; const rotateX = (y / cardRect.height - 0.5) * -10; // Apply transform to card card.style.transform = `perspective(1000px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) translateZ(10px)`; // Apply parallax effect to elements inside card background.style.transform = `translateZ(-20px) scale(1.1)`; details.style.transform = `translateZ(30px)`; // Spotlight effect spotlight.style.opacity = '1'; spotlight.style.transform = `translate(${x}px, ${y}px)`; }); card.addEventListener('mouseleave', () => { card.style.transform = 'perspective(1000px) rotateX(0) rotateY(0) translateZ(0)'; background.style.transform = 'translateZ(0) scale(1)'; details.style.transform = 'translateZ(0)'; spotlight.style.opacity = '0'; }); }); // 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'); // Show/hide restaurants based on filter (demo functionality) const filterType = this.textContent.trim(); cards.forEach(card => { const type = card.querySelector('.restaurant-type').textContent; if (filterType === 'All' || type === filterType) { card.style.display = 'block'; setTimeout(() => { card.classList.add('
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Data Visualization Stacked Cards</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; } body { background-color: #f0f4f8; display: flex; justify-content: center; align-items: center; min-height: 700px; color: #1a3a5f; overflow-x: hidden; } .container { width: 100%; max-width: 650px; padding: 20px; perspective: 1000px; } .header { text-align: center; margin-bottom: 30px; } .header h1 { font-size: 28px; font-weight: 700; margin-bottom: 10px; color: #1a3a5f; letter-spacing: -0.5px; } .header p { font-size: 14px; color: #4a6585; max-width: 500px; margin: 0 auto; line-height: 1.5; } .stacked-cards { position: relative; height: 480px; margin: 0 auto; transform-style: preserve-3d; } .card { position: absolute; width: 100%; height: 120px; padding: 20px; border-radius: 10px; background: linear-gradient(135deg, #ffffff, #f5f9ff); box-shadow: 0 8px 30px rgba(0, 45, 100, 0.07), 0 1px 3px rgba(0, 45, 100, 0.05); transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1); overflow: hidden; cursor: pointer; transform-origin: center bottom; backface-visibility: hidden; } .card::before { content: ''; position: absolute; top: 0; left: 0; width: 5px; height: 100%; border-radius: 10px 0 0 10px; } .card.expanded { height: 380px; z-index: 10; box-shadow: 0 15px 40px rgba(0, 45, 100, 0.12); } .card:not(.expanded):hover { transform: translateY(-5px); box-shadow: 0 12px 35px rgba(0, 45, 100, 0.1); } .card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; } .card-title { font-size: 16px; font-weight: 600; display: flex; align-items: center; } .card-icon { width: 24px; height: 24px; margin-right: 10px; display: flex; align-items: center; justify-content: center; border-radius: 6px; } .card-teaser { font-size: 13px; color: #4a6585; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 80%; } .card-content { height: 0; opacity: 0; overflow: hidden; transition: opacity 0.6s ease; padding-top: 15px; } .card.expanded .card-content { height: auto; opacity: 1; } .data-stats { display: flex; justify-content: space-between; margin-bottom: 20px; } .stat-item { text-align: center; } .stat-value { font-size: 22px; font-weight: 700; margin-bottom: 5px; } .stat-label { font-size: 11px; color: #6b829d; text-transform: uppercase; letter-spacing: 0.5px; } .chart-container { height: 180px; position: relative; margin: 0 auto; margin-bottom: 15px; overflow: hidden; } .chart-container canvas { max-width: 100%; } .axis-label { font-size: 11px; color: #6b829d; position: absolute; } .y-axis-label { transform: rotate(-90deg); left: -15px; top: 50%; } .x-axis-label { bottom: -5px; text-align: center; width: 100%; } .card-footer { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #6b829d; margin-top: 10px; } .last-updated { display: flex; align-items: center; } .footer-icon { margin-right: 5px; width: 14px; height: 14px; } .data-source { border-bottom: 1px dashed #a9c0dd; padding-bottom: 1px; } .expand-indicator { position: absolute; bottom: 15px; right: 15px; width: 22px; height: 22px; border-radius: 50%; background-color: rgba(255, 255, 255, 0.9); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 5px rgba(0, 45, 100, 0.1); transition: transform 0.3s ease; } .card.expanded .expand-indicator svg { transform: rotate(180deg); } .geometric-pattern { position: absolute; top: 0; right: 0; width: 120px; height: 120px; opacity: 0.03; transform: translate(20%, -20%); pointer-events: none; } /* Card-specific colors */ .card:nth-child(1)::before { background-color: #4285F4; } .card:nth-child(1) .card-icon { background-color: rgba(66, 133, 244, 0.1); color: #4285F4; } .card:nth-child(1) .geometric-pattern { color: #4285F4; } .card:nth-child(2)::before { background-color: #00ACC1; } .card:nth-child(2) .card-icon { background-color: rgba(0, 172, 193, 0.1); color: #00ACC1; } .card:nth-child(2) .geometric-pattern { color: #00ACC1; } .card:nth-child(3)::before { background-color: #673AB7; } .card:nth-child(3) .card-icon { background-color: rgba(103, 58, 183, 0.1); color: #673AB7; } .card:nth-child(3) .geometric-pattern { color: #673AB7; } .card:nth-child(4)::before { background-color: #3F51B5; } .card:nth-child(4) .card-icon { background-color: rgba(63, 81, 181, 0.1); color: #3F51B5; } .card:nth-child(4) .geometric-pattern { color: #3F51B5; } /* Animation for data points */ @keyframes dataPointAppear { 0% { opacity: 0; transform: scale(0); } 50% { opacity: 1; transform: scale(1.2); } 100% { opacity: 1; transform: scale(1); } } .data-point { animation: dataPointAppear 0.5s ease forwards; animation-delay: calc(var(--index) * 0.05s); opacity: 0; } /* Responsive adjustments */ @media (max-width: 600px) { .container { padding: 15px; } .header h1 { font-size: 24px; } .card { height: 130px; } .card.expanded { height: 420px; } .chart-container { height: 160px; } .stat-value { font-size: 18px; } } /* Loader animation */ .loader { width: 20px; height: 20px; border: 2px solid rgba(66, 133, 244, 0.2); border-radius: 50%; border-top-color: #4285F4; animation: spin 1s ease-in-out infinite; margin-left: 10px; display: none; } @keyframes spin { to { transform: rotate(360deg); } } /* Pulsing glow effect */ @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(66, 133, 244, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(66, 133, 244, 0); } 100% { box-shadow: 0 0 0 0 rgba(66, 133, 244, 0); } } .card.pulse { animation: pulse 2s infinite; } .hexagon-background { position: absolute; top: 0; right: 0; bottom: 0; left: 0; opacity: 0.02; pointer-events: none; overflow: hidden; } .hexagon { position: absolute; width: 30px; height: 17.32px; /* width * 0.577 */ background-color: currentColor; margin: 8.66px 0; /* width * 0.289 */ opacity: 0.7; border-radius: 2px; } .hexagon:before, .hexagon:after { content: ""; position: absolute; width: 0; border-left: 15px solid transparent; border-right: 15px solid transparent; } .hexagon:before { bottom: 100%; border-bottom: 8.66px solid currentColor; } .hexagon:after { top: 100%; width: 0; border-top: 8.66px solid currentColor; } </style> </head> <body> <div class="container"> <div class="header"> <h1>Multidimensional Data Explorer</h1> <p>Analyze and compare key metrics across different datasets. Click any card to expand and explore the underlying data patterns and insights.</p> </div> <div class="stacked-cards" id="stacked-cards"> <div class="card" data-index="0"> <div class="hexagon-background"> <div class="hexagon" style="top: 15%; left: 80%;"></div> <div class="hexagon" style="top: 45%; left: 75%;"></div> <div class="hexagon" style="top: 65%; left: 85%;"></div> </div> <div class="card-header"> <div class="card-title"> <div class="card-icon"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> <path d="M0 14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2a2 2 0 0 0-2 2v12zm5.25-10a.75.75 0 0 1 .75.75v5.5a.75.75 0 0 1-1.5 0v-5.5a.75.75 0 0 1 .75-.75zm1.75 1.75a.75.75 0 0 1 .75-.75h.5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1-.75-.75v-4.5zm3 .5a.75.75 0 0 1 1.5 0v3.5a.75.75 0 0 1-1.5 0v-3.5z"/> </svg> </div> User Engagement Metrics </div> </div> <p class="card-teaser">Detailed analysis of user interactions across web and mobile platforms, showing a 24% growth in daily active users.</p> <div class="card-content"> <div class="data-stats"> <div class="stat-item"> <div class="stat-value">2.4M</div> <div class="stat-label">Monthly Users</div> </div> <div class="stat-item"> <div class="stat-value">18.5</div> <div class="stat-label">Avg. Session (min)</div> </div> <div class="stat-item"> <div class="stat-value">+24%</div> <div class="stat-label">YOY Growth</div> </div> </div> <div class="chart-container"> <canvas id="chart1"></canvas> <div class="axis-label y-axis-label">Users (thousands)</div> <div class="axis-label x-axis-label">Last 30 Days</div> </div> <div class="card-footer"> <div class="last-updated"> <svg class="footer-icon" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> Updated 6 hours ago </div> <div class="data-source">Analytics API</div> </div> </div> <div class="expand-indicator"> <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="#4a6585" viewBox="0 0 16 16"> <path d="M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708l6-6z"/> </svg> </div> </div> <div class="card" data-index="1"> <div class="hexagon-background"> <div class="hexagon" style="top: 25%; left: 70%;"></div> <div class="hexagon" style="top: 55%; left: 80%;"></div> <div class="hexagon" style="top: 35%; left: 85%;"></div> </div> <div class="card-header"> <div class="card-title"> <div class="card-icon"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> <path d="M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm3.78-9.72a.75.75 0 0 1 0 1.06L9.06 10l2.72 2.72a.75.75 0 1 1-1.06 1.06L8 11.06l-2.72 2.72a.75.75 0 0 1-1.06-1.06L6.94 10 4.22 7.28a.75.75 0 0 1 1.06-1.06L8 8.94l2.72-2.72a.75.75 0 0 1 1.06 0z"/> </svg> </div> Performance Optimization </div> </div> <p class="card-teaser">Key metrics tracking page load times and resource consumption, revealing 42% faster load times after recent optimizations.</p> <div class="card-content"> <div class="data-stats"> <div class="stat-item"> <div class="stat-value">1.2s</div> <div class="stat-label">Avg. Load Time</div> </div> <div class="stat-item"> <div class="stat-value">-42%</div> <div class="stat-label">Time Reduction</div> </div> <div class="stat-item"> <div class="stat-value">98.7%</div> <div class="stat-label">Availability</div> </div> </div> <div class="chart-container"> <canvas id="chart2"></canvas> <div class="axis-label y-axis-label">Time (seconds)</div> <div class="axis-label x-axis-label">Implementation Phases</div> </div> <div class="card-footer"> <div class="last-updated"> <svg class="footer-icon" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> Updated 12 hours ago </div> <div class="data-source">Performance Monitoring</div> </div> </div> <div class="expand-indicator"> <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="#4a6585" viewBox="0 0 16 16"> <path d="M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708l6-6z"/> </svg> </div> </div> <div class="card" data-index="2"> <div class="hexagon-background"> <div class="hexagon" style="top: 30%; left: 75%;"></div> <div class="hexagon" style="top: 60%; left: 65%;"></div> <div class="hexagon" style="top: 40%; left: 85%;"></div> </div> <div class="card-header"> <div class="card-title"> <div class="card-icon"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> <path d="M8 16a2 2 0 0 0 2-2H6a2 2 0 0 0 2 2zm.995-14.901a1 1 0 1 0-1.99 0A5.002 5.002 0 0 0 3 6c0 1.098-.5 6-2 7h14c-1.5-1-2-5.902-2-7 0-2.42-1.72-4.44-4.005-4.901z"/> </svg> </div> Conversion Pathways </div> </div> <p class="card-teaser">Analysis of customer journeys showing key touchpoints and conversion rates across marketing channels and sales funnels.</p> <div class="card-content"> <div class="data-stats"> <div class="stat-item"> <div class="stat-value">3.8%</div> <div class="stat-label">Conversion Rate</div> </div> <div class="stat-item"> <div class="stat-value">+16%</div> <div class="stat-label">Improvement</div> </div> <div class="stat-item"> <div class="stat-value">$42</div> <div class="stat-label">Avg. CAC</div> </div> </div> <div class="chart-container"> <canvas id="chart3"></canvas> <div class="axis-label y-axis-label">Conversion %</div> <div class="axis-label x-axis-label">Marketing Channels</div> </div> <div class="card-footer"> <div class="last-updated"> <svg class="footer-icon" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> Updated 2 days ago </div> <div class="data-source">Marketing Platform</div> </div> </div> <div class="expand-indicator"> <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="#4a6585" viewBox="0 0 16 16"> <path d="M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708l6-6z"/> </svg> </div> </div> <div class="card" data-index="3"> <div class="hexagon-background"> <div class="hexagon" style="top: 20%; left: 65%;"></div> <div class="hexagon" style="top: 50%; left: 75%;"></div> <div class="hexagon" style="top: 70%; left: 70%;"></div> </div> <div class="card-header"> <div class="card-title"> <div class="card-icon"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> <path d="M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"/> </svg> </div> Content Effectiveness </div> </div> <p class="card-teaser">Measurement of content performance across blog posts, videos, and interactive media, showing strong ROI on multimedia content.</p> <div class="card-content"> <div class="data-stats"> <div class="stat-item"> <div class="stat-value">4.2m</div> <div class="stat-label">Content Views</div> </div> <div class="stat-item"> <div class="stat-value">2:24</div> <div class="stat-label">Avg. Time</div> </div> <div class="stat-item"> <div class="stat-value">12.5K</div> <div class="stat-label">Shares</div> </div> </div> <div class="chart-container"> <canvas id="chart4"></canvas> <div class="axis-label y-axis-label">Engagement Rate</div> <div class="axis-label x-axis-label">Content Types</div> </div> <div class="card-footer"> <div class="last-updated"> <svg class="footer-icon" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> Updated 1 day ago </div> <div class="data-source">Content Analytics</div> </div> </div> <div class="expand-indicator"> <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="#4a6585" viewBox="0 0 16 16"> <path d="M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708l6-6z"/> </svg> </div> </div> </div> </div> <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/chart.min.js"></script> <script> document.addEventListener('DOMContentLoaded', function() { const stackedCards = document.getElementById('stacked-cards'); const cards = document.querySelectorAll('.card'); // Initial positioning of cards function arrangeCards() { cards.forEach((card, index) => { const translateY = index * 80; card.style.transform = `translateY(${translateY}px)`; card.style.zIndex = cards.length - index; }); } arrangeCards(); // Handle card click to expand/collapse cards.forEach(card => { card.addEventListener('click', function() { const isExpanded = this.classList.contains('expanded'); // Collapse any previously expanded cards cards.forEach(c => { if (c !== this && c.classList.contains('expanded')) { c.classList.remove('expanded'); } }); // Toggle current card this.classList.toggle('expanded'); // Rearrange cards based on which one is expanded const expandedIndex = isExpanded ? -1 : parseInt(this.getAttribute('data-index')); cards.forEach((card, index) => { const cardIndex = parseInt(card.getAttribute('data-index')); let translateY; if (expandedIndex === -1) { // All cards collapsed - normal stacking translateY = index * 80; } else if (cardIndex === expandedIndex) { // This is the expanded card - place it at the top translateY = 0; } else if (cardIndex < expandedIndex) { // Cards above the expanded one - stack them at the top translateY = cardIndex * 30; } else { // Cards below the expanded one - push them down translateY = 380 + (cardIndex - expandedIndex - 1) * 30; } card.style.transform = `translateY(${translateY}px)`; }); // If a card is expanded, initialize its chart if (!isExpanded) { const chartId = `chart${parseInt(this.getAttribute('data-index')) + 1}`; initializeChart(chartId); } }); // Hover effect card.addEventListener('mouseenter', function() { if (!this.classList.contains('expanded')) { this.classList.add('pulse'); } }); card.addEventListener('mouseleave', function() { this.classList.remove('pulse'); }); }); // Chart initialization functions function initializeChart(chartId) { let ctx = document.getElementById(chartId).getContext('2d'); let chartData; let options; // Different data for each chart switch(chartId) { case 'chart1': // User Engagement Chart - Line Chart chartData = { labels: ['1', '5', '10', '15', '20', '25', '30'], datasets: [{ label: 'Daily Active Users', data: [82, 90, 105, 115, 112, 125, 135], borderColor: '#4285F4', backgroundColor: 'rgba(66, 133, 244, 0.1)', tension: 0.4, fill: true, pointBackgroundColor: '#4285F4', pointRadius: 4, pointHoverRadius: 6 }] }; options = { responsive: true, maintainAspectRatio: false, animation: { duration: 1000, easing: 'easeOutQuart' }, scales: { y: { beginAtZero: true, grid: { color: 'rgba(200, 200, 200, 0.1)' }, ticks: { font: { size: 10 } } }, x: { grid: { display: false }, ticks: { font: { size: 10 } } } }, plugins: { legend: { display: false }, tooltip: { backgroundColor: 'rgba(26, 58, 95, 0.9)', padding: 10, cornerRadius: 6, displayColors: false } } }; break; case 'chart2': // Performance Optimization - Bar Chart chartData = { labels: ['Phase 1', 'Phase 2', 'Phase 3', 'Phase 4'], datasets: [{ label: 'Load Time Before', data: [3.2, 2.8, 2.3, 2.1], backgroundColor: 'rgba(0, 172, 193, 0.4)', borderColor: 'rgba(0, 172, 193, 1)', borderWidth: 1, barPercentage: 0.6, borderRadius: 4 }, { label: 'Load Time After', data: [2.9, 2.1, 1.6, 1.2], backgroundColor: 'rgba(0, 172, 193, 0.8)', borderColor: 'rgba(0, 172, 193, 1)', borderWidth: 1, barPercentage: 0.6, borderRadius: 4 }] }; options = { responsive: true, maintainAspectRatio: false, animation: { duration: 1000, easing: 'easeOutQuart' }, scales: { y: { beginAtZero: true, grid: { color: 'rgba(200, 200, 200, 0.1)' }, ticks: { font: { size: 10 } } }, x: { grid: { display: false }, ticks: { font: { size: 10 } } } }, plugins: { legend: { position: 'top', align: 'end', labels: { boxWidth: 12, font: { size: 10 } } }, tooltip: { backgroundColor: 'rgba(26, 58, 95, 0.9)', padding: 10, cornerRadius: 6 } } }; break; case 'chart3': // Conversion Pathways - Line Chart chartData = { labels: ['Organic', 'Direct', 'Social', 'Email', 'Referral', 'Paid'], datasets: [{ label: 'Previous Quarter', data: [2.1, 3.4, 2.8, 3.2, 1.8, 2.4], borderColor: 'rgba(103, 58, 183, 0.4)', backgroundColor: 'rgba(0, 0, 0, 0)', borderWidth: 2, pointBackgroundColor: 'rgba(103, 58, 183, 0.4)', pointRadius: 4, tension: 0.3 }, { label: 'Current Quarter', data: [2.5, 3.8, 3.2, 3.9, 2.2, 2.9], borderColor: 'rgba(103, 58, 183, 1)', backgroundColor: 'rgba(0, 0, 0, 0)', borderWidth: 2, pointBackgroundColor: 'rgba(103, 58, 183, 1)', pointRadius: 4, tension: 0.3 }] }; options = { responsive: true, maintainAspectRatio: false, animation: { duration: 1000, easing: 'easeOutQuart' }, scales: { y: { beginAtZero: true, grid: { color: 'rgba(200, 200, 200, 0.1)' }, ticks: { font: { size: 10 }, callback: function(value) { return value + '%'; } } }, x: { grid: { display: false }, ticks: { font: { size: 10 } } } }, plugins: {