Movie cards are a powerful tool for showcasing films in a visually appealing and informative way. They combine essential details with striking visuals to capture the audience's attention instantly.
In this article, we will explore ten exemplary movie card designs that stand out for their creativity and functionality. These examples will inspire you to create your own stunning movie cards.
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 movie card designs with Subframe's drag-and-drop interface and intuitive, responsive canvas. Create pixel-perfect UI effortlessly, every time.
Loved by professionals, Subframe ensures your designs are both stunning and functional. Start for free today!
CODE6
Here's the code:
CODETEXT6
CODE7
Here's the code:
CODETEXT7
CODE8
Here's the code:
CODETEXT8
CODE9
Here's the code:
CODETEXT9
CODE10
Here's the code:
CODETEXT10
Ready to elevate your UI designs? With Subframe, you can create pixel-perfect movie cards and other stunning interfaces effortlessly. Our drag-and-drop editor ensures efficiency and precision.
Don't wait—start designing beautiful, functional UIs immediately. Start for free today!
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> :root { --primary-color: #6200ee; --hover-color: #3700b3; --text-light: #ffffff; --text-dark: #121212; --background-dark: #1a1a1a; --card-bg: #2d2d2d; --accent-color: #03dac6; --rating-color: #ffca28; --fresh-badge: #4caf50; --adult-badge: #f44336; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; } body { background-color: var(--background-dark); color: var(--text-light); display: flex; justify-content: center; align-items: center; min-height: 100vh; overflow-x: hidden; padding: 20px; } .container { max-width: 700px; width: 100%; margin: 0 auto; } .streaming-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; padding: 0 10px; } .logo { font-size: 1.8rem; font-weight: 700; background: linear-gradient(90deg, var(--primary-color), var(--accent-color)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: -0.5px; } .controls { display: flex; gap: 12px; } .controls button { background: none; border: none; color: var(--text-light); font-size: 0.9rem; cursor: pointer; padding: 5px 10px; border-radius: 4px; transition: background-color 0.3s ease; } .controls button:hover { background-color: rgba(255, 255, 255, 0.1); } .controls button.active { background-color: var(--primary-color); color: white; } .movies-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; margin-bottom: 2rem; } .movie-card { position: relative; border-radius: 12px; overflow: hidden; background-color: var(--card-bg); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease; cursor: pointer; aspect-ratio: 2/3; will-change: transform; } .movie-card:hover { transform: translateY(-10px) scale(1.03); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4); z-index: 2; } .movie-poster { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; } .movie-card:hover .movie-poster { transform: scale(1.05); } .movie-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0) 100%); padding: 20px 15px; transform: translateY(70%); transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1); display: flex; flex-direction: column; gap: 8px; height: 100%; justify-content: flex-end; } .movie-card:hover .movie-overlay { transform: translateY(0); } .movie-title { font-size: 1rem; font-weight: 700; margin-bottom: 5px; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); } .movie-badges { display: flex; gap: 6px; margin-bottom: 4px; } .movie-badge { font-size: 0.7rem; padding: 3px 6px; border-radius: 3px; background-color: rgba(255, 255, 255, 0.2); backdrop-filter: blur(4px); } .movie-badge.fresh { background-color: var(--fresh-badge); } .movie-badge.adult { background-color: var(--adult-badge); } .movie-rating { display: flex; align-items: center; gap: 4px; margin: 6px 0; } .stars { display: flex; gap: 2px; } .stars .star { color: var(--rating-color); font-size: 0.85rem; } .movie-synopsis { font-size: 0.8rem; line-height: 1.4; opacity: 0; transform: translateY(10px); transition: opacity 0.4s ease, transform 0.4s ease; transition-delay: 0.1s; color: rgba(255, 255, 255, 0.85); margin-bottom: 10px; max-height: 80px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; } .movie-card:hover .movie-synopsis { opacity: 1; transform: translateY(0); } .movie-actions { display: flex; justify-content: space-between; margin-top: auto; opacity: 0; transform: translateY(10px); transition: opacity 0.4s ease, transform 0.4s ease; transition-delay: 0.2s; } .movie-card:hover .movie-actions { opacity: 1; transform: translateY(0); } .action-btn { background-color: var(--primary-color); color: white; border: none; border-radius: 4px; padding: 6px 12px; font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: background-color 0.3s ease, transform 0.3s ease; } .action-btn:hover { background-color: var(--hover-color); transform: scale(1.05); } .action-btn.secondary { background-color: transparent; border: 1px solid rgba(255, 255, 255, 0.5); } .action-btn.secondary:hover { background-color: rgba(255, 255, 255, 0.1); } .genre-pill { display: inline-block; padding: 3px 8px; border-radius: 12px; font-size: 0.7rem; background-color: rgba(255, 255, 255, 0.1); margin-right: 5px; margin-bottom: 5px; opacity: 0; transform: translateY(10px); transition: opacity 0.4s ease, transform 0.4s ease; transition-delay: 0.15s; } .movie-card:hover .genre-pill { opacity: 1; transform: translateY(0); } .progress-bar { height: 3px; background-color: rgba(255, 255, 255, 0.2); border-radius: 3px; overflow: hidden; margin-top: 5px; width: 100%; opacity: 0; transition: opacity 0.4s ease; } .movie-card:hover .progress-bar { opacity: 1; } .progress { height: 100%; background-color: var(--accent-color); width: 0%; transition: width 0.3s ease; } /* Pulse animation for "New" badge */ @keyframes pulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.1); opacity: 0.9; } 100% { transform: scale(1); opacity: 1; } } .new-badge { position: absolute; top: 10px; right: 10px; background-color: var(--primary-color); color: white; padding: 4px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 700; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); animation: pulse 2s infinite; z-index: 1; } /* Responsive adjustments */ @media (max-width: 600px) { .movies-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; } .streaming-header { flex-direction: column; align-items: flex-start; gap: 10px; } .controls { width: 100%; overflow-x: auto; padding-bottom: 10px; } } /* Subtle grid background pattern */ .pattern-bg { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-image: linear-gradient(rgba(26, 26, 26, 0.9) 1px, transparent 1px), linear-gradient(90deg, rgba(26, 26, 26, 0.9) 1px, transparent 1px); background-size: 20px 20px; pointer-events: none; z-index: -1; } /* Highlight effect for recently watched */ .movie-card.recently-watched::after { content: ''; position: absolute; inset: 0; border: 2px solid var(--accent-color); border-radius: 12px; opacity: 0.7; pointer-events: none; } </style> </head> <body> <div class="pattern-bg"></div> <div class="container"> <div class="streaming-header"> <div class="logo">CineFlix</div> <div class="controls"> <button class="active">Trending</button> <button>New Releases</button> <button>For You</button> <button>Watchlist</button> </div> </div> <div class="movies-grid"> <!-- Movie Card 1 --> <div class="movie-card"> <img src="https://source.unsplash.com/random/400x600?film" alt="The Grand Illusion" class="movie-poster"> <div class="new-badge">NEW</div> <div class="movie-overlay"> <h3 class="movie-title">The Grand Illusion</h3> <div class="movie-badges"> <span class="movie-badge fresh">96% Fresh</span> <span class="movie-badge">2023</span> </div> <div class="movie-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>4.7</span> </div> <div class="genre-pill">Thriller</div> <div class="genre-pill">Mystery</div> <p class="movie-synopsis">A renowned illusionist discovers a dark conspiracy while performing his most ambitious trick yet. As reality bends, he must untangle truth from deception before it's too late.</p> <div class="progress-bar"> <div class="progress" style="width: 0%"></div> </div> <div class="movie-actions"> <button class="action-btn">Play</button> <button class="action-btn secondary">+ My List</button> </div> </div> </div> <!-- Movie Card 2 --> <div class="movie-card recently-watched"> <img src="https://source.unsplash.com/random/400x600?cinema" alt="Neon Nights" class="movie-poster"> <div class="movie-overlay"> <h3 class="movie-title">Neon Nights</h3> <div class="movie-badges"> <span class="movie-badge">2023</span> </div> <div class="movie-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>4.9</span> </div> <div class="genre-pill">Sci-Fi</div> <div class="genre-pill">Action</div> <p class="movie-synopsis">In a dystopian future where light is currency, a street-smart hacker must navigate the dangerous neon-lit underworld to find her missing sister.</p> <div class="progress-bar"> <div class="progress" style="width: 35%"></div> </div> <div class="movie-actions"> <button class="action-btn">Continue</button> <button class="action-btn secondary">Info</button> </div> </div> </div> <!-- Movie Card 3 --> <div class="movie-card"> <img src="https://source.unsplash.com/random/400x600?movie" alt="Whispers of Time" class="movie-poster"> <div class="movie-overlay"> <h3 class="movie-title">Whispers of Time</h3> <div class="movie-badges"> <span class="movie-badge">2022</span> </div> <div class="movie-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>3.2</span> </div> <div class="genre-pill">Drama</div> <div class="genre-pill">Romance</div> <p class="movie-synopsis">A poignant tale of love lost and found across decades, as memories from different timelines begin to blur together for a woman with a mysterious condition.</p> <div class="progress-bar"> <div class="progress" style="width: 0%"></div> </div> <div class="movie-actions"> <button class="action-btn">Play</button> <button class="action-btn secondary">+ My List</button> </div> </div> </div> <!-- Movie Card 4 --> <div class="movie-card"> <img src="https://source.unsplash.com/random/400x600?action" alt="Rogue Protocol" class="movie-poster"> <div class="movie-overlay"> <h3 class="movie-title">Rogue Protocol</h3> <div class="movie-badges"> <span class="movie-badge">2023</span> <span class="movie-badge adult">18+</span> </div> <div class="movie-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>4.2</span> </div> <div class="genre-pill">Action</div> <div class="genre-pill">Espionage</div> <p class="movie-synopsis">An elite operative goes off-grid when a classified mission goes wrong. With advanced AI systems hunting her down, she must expose a government conspiracy before time runs out.</p> <div class="progress-bar"> <div class="progress" style="width: 0%"></div> </div> <div class="movie-actions"> <button class="action-btn">Play</button> <button class="action-btn secondary">+ My List</button> </div> </div> </div> <!-- Movie Card 5 --> <div class="movie-card"> <img src="https://source.unsplash.com/random/400x600?horror" alt="Echoes in the Dark" class="movie-poster"> <div class="movie-overlay"> <h3 class="movie-title">Echoes in the Dark</h3> <div class="movie-badges"> <span class="movie-badge fresh">92% Fresh</span> <span class="movie-badge">2023</span> </div> <div class="movie-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>4.8</span> </div> <div class="genre-pill">Horror</div> <div class="genre-pill">Psychological</div> <p class="movie-synopsis">When a paranormal investigator discovers a device that can record the voices of the dead, she uncovers a horrifying secret about her own family's past.</p> <div class="progress-bar"> <div class="progress" style="width: 0%"></div> </div> <div class="movie-actions"> <button class="action-btn">Play</button> <button class="action-btn secondary">+ My List</button> </div> </div> </div> <!-- Movie Card 6 --> <div class="movie-card"> <img src="https://source.unsplash.com/random/400x600?comedy" alt="Last Call" class="movie-poster"> <div class="movie-overlay"> <h3 class="movie-title">Last Call</h3> <div class="movie-badges"> <span class="movie-badge">2022</span> </div> <div class="movie-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>3.9</span> </div> <div class="genre-pill">Comedy</div> <div class="genre-pill">Drama</div> <p class="movie-synopsis">A failed comedian returns to his hometown bar for one last shot at redemption. As the night unfolds, past relationships are rekindled and old wounds reopened.</p> <div class="progress-bar"> <div class="progress" style="width: 68%"></div> </div> <div class="movie-actions"> <button class="action-btn">Continue</button> <button class="action-btn secondary">Info</button> </div> </div> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Initialize movie cards with interactive effects const movieCards = document.querySelectorAll('.movie-card'); movieCards.forEach(card => { // Parallax effect on hover card.addEventListener('mousemove', (e) => { const rect = card.getBoundingClientRect(); const x = (e.clientX - rect.left) / rect.width; const y = (e.clientY - rect.top) / rect.height; // Calculate tilt values (limited to subtle movement) const tiltX = (y - 0.5) * 10; // -5 to 5 degrees const tiltY = (0.5 - x) * 10; // -5 to 5 degrees // Apply the tilt and slight movement card.style.transform = `perspective(1000px) rotateX(${tiltX}deg) rotateY(${tiltY}deg) scale(1.05)`; // Move the poster slightly for a deeper effect const poster = card.querySelector('.movie-poster'); poster.style.transform = `translateX(${(x - 0.5) * -10}px) translateY(${(y - 0.5) * -10}px) scale(1.1)`; }); // Reset on mouse leave card.addEventListener('mouseleave', () => { card.style.transform = ''; const poster = card.querySelector('.movie-poster'); poster.style.transform = ''; }); // Add click effect card.addEventListener('click', function() { // Simulate a gentle press-down effect card.style.transform = 'scale(0.98)'; setTimeout(() => { card.style.transform = ''; }, 150); // Find the progress bar for this card and update it randomly when clicked // (simulating starting or continuing the movie) const progressBar = card.querySelector('.progress'); if (progressBar) { const currentWidth = parseFloat(progressBar.style.width) || 0; // If it's a new movie, set a small progress if (currentWidth === 0) { progressBar.style.width = '5%'; } // Otherwise advance the progress a bit else if (currentWidth < 90) { progressBar.style.width = `${currentWidth + Math.random() * 15 + 5}%`; } } }); }); // Make category buttons interactive const categoryButtons = document.querySelectorAll('.controls button'); categoryButtons.forEach(button => { button.addEventListener('click', function() { // Remove active class from all buttons categoryButtons.forEach(btn => btn.classList.remove('active')); // Add active class to clicked button this.classList.add('active'); // Simulate category change with subtle animation movieCards.forEach(card => { card.style.opacity = '0.5'; card.style.transform = 'scale(0.95)'; setTimeout(() => { card.style.opacity = '1'; card.style.transform = ''; }, 400); }); }); }); // Play buttons functionality const playButtons = document.querySelectorAll('.action-btn'); playButtons.forEach(button => { button.addEventListener('click', function(e) { e.stopPropagation(); // Prevent triggering card click // Add ripple effect to button const ripple = document.createElement('span'); ripple.style.position = 'absolute'; ripple.style.borderRadius = '50%'; ripple.style.backgroundColor = 'rgba(255, 255, 255, 0.7)'; ripple.style.width = '20px'; ripple.style.height = '20px'; ripple.style.transform = 'translate(-50%, -50%) scale(0)'; ripple.style.animation = 'ripple 0.6s linear'; const rect = button.getBoundingClientRect(); ripple.style.left = `${e.clientX - rect.left}px`; ripple.style.top = `${e.clientY - rect.top}px`; button.appendChild(ripple); setTimeout(() => { ripple.remove(); }, 600); // Update progress bar if it's a play/continue button if (button.textContent === 'Play' || button.textContent === 'Continue') { const card = button.closest('.movie-card'); const progressBar = card.querySelector('.progress'); if (progressBar) { const currentWidth = parseFloat(progressBar.style.width) || 0; if (button.textContent === 'Play') { progressBar.style.width = '5%'; } else { progressBar.style.width = `${Math.min(currentWidth + 15, 100)}%`; } } } }); }); // Add CSS for ripple effect const style = document.createElement('style'); style.textContent = ` @keyframes ripple { to { transform: translate(-50%, -50%) scale(4); opacity: 0; } } .action-btn { position: relative; overflow: hidden; } `; document.head.appendChild(style); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Cinemo - Now Showing</title> <style> :root { --primary: #1a1a2e; --secondary: #e94560; --accent: #0f3460; --light: #f5f5f5; --shadow: rgba(0, 0, 0, 0.2); } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Montserrat', sans-serif; } body { background: var(--primary); color: var(--light); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; min-height: 100vh; padding: 2rem 1rem; overflow-x: hidden; } header { width: 100%; text-align: center; margin-bottom: 2rem; } .logo { font-size: 2.5rem; font-weight: 700; background: linear-gradient(90deg, var(--light) 0%, var(--secondary) 100%); background-clip: text; -webkit-background-clip: text; color: transparent; letter-spacing: 1px; position: relative; display: inline-block; margin-bottom: 0.5rem; } .logo::after { content: ''; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%); width: 50px; height: 3px; background: var(--secondary); border-radius: 10px; } .subtitle { font-size: 1rem; font-weight: 400; color: var(--light); opacity: 0.8; } .movie-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; width: 100%; max-width: 680px; } .movie-card { position: relative; height: 300px; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 20px var(--shadow); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); cursor: pointer; } .movie-card:hover { transform: translateY(-10px); } .movie-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; } .movie-card:hover img { transform: scale(1.05); } .movie-info { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, var(--primary) 0%, transparent 100%); padding: 1.5rem 1rem 1rem; transform: translateY(70%); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); } .movie-card:hover .movie-info { transform: translateY(0); } .movie-title { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.5rem; } .movie-meta { display: flex; align-items: center; margin-bottom: 0.5rem; font-size: 0.85rem; opacity: 0.8; } .movie-meta span { display: flex; align-items: center; margin-right: 1rem; } .movie-meta i { margin-right: 5px; font-size: 0.9rem; } .movie-description { font-size: 0.85rem; margin-bottom: 1rem; opacity: 0; transform: translateY(10px); transition: all 0.4s ease 0.1s; } .movie-card:hover .movie-description { opacity: 0.8; transform: translateY(0); } .showtimes { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; opacity: 0; transform: translateY(10px); transition: all 0.4s ease 0.2s; } .movie-card:hover .showtimes { opacity: 1; transform: translateY(0); } .time { padding: 0.3rem 0.6rem; background: rgba(255, 255, 255, 0.1); border-radius: 4px; font-size: 0.75rem; transition: all 0.3s ease; } .time:hover { background: var(--secondary); color: var(--light); } .actions { display: flex; gap: 0.8rem; opacity: 0; transform: translateY(10px); transition: all 0.4s ease 0.3s; } .movie-card:hover .actions { opacity: 1; transform: translateY(0); } .btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.5rem 1rem; border: none; border-radius: 4px; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; } .btn-primary { background: var(--secondary); color: var(--light); } .btn-primary:hover { background: #d03651; transform: translateY(-2px); } .btn-secondary { background: transparent; color: var(--light); border: 1px solid var(--light); } .btn-secondary:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); } .btn i { margin-right: 5px; } .rating { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); z-index: 2; } .rating.high { color: #4CAF50; } .rating.medium { color: #FFC107; } .rating.low { color: var(--secondary); } /* Trailer modal */ .trailer-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.9); display: flex; align-items: center; justify-content: center; z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; } .trailer-modal.active { opacity: 1; pointer-events: all; } .trailer-content { position: relative; width: 90%; max-width: 800px; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; overflow: hidden; box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5); transform: scale(0.9); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); } .trailer-modal.active .trailer-content { transform: scale(1); } .trailer-content iframe { width: 100%; height: 100%; border: none; } .close-trailer { position: absolute; top: -40px; right: 0; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border: none; background: transparent; color: var(--light); font-size: 1.5rem; cursor: pointer; } .trailer-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: var(--light); background: #111; } /* Pulse animation for trailer button */ @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(233, 69, 96, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(233, 69, 96, 0); } 100% { box-shadow: 0 0 0 0 rgba(233, 69, 96, 0); } } .btn-trailer:hover { animation: pulse 1.5s infinite; } /* Responsive */ @media (max-width: 650px) { .movie-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.5rem; } .movie-card { height: 250px; } .movie-title { font-size: 1rem; } .actions { flex-direction: column; gap: 0.5rem; } .btn { width: 100%; padding: 0.4rem; font-size: 0.75rem; } } /* Animation for card entrance */ @keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } .movie-card { animation: fadeInUp 0.6s ease forwards; opacity: 0; } .movie-card:nth-child(1) { animation-delay: 0.1s; } .movie-card:nth-child(2) { animation-delay: 0.3s; } .movie-card:nth-child(3) { animation-delay: 0.5s; } .movie-card:nth-child(4) { animation-delay: 0.7s; } /* Custom scroll bar */ ::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-track { background: var(--primary); } ::-webkit-scrollbar-thumb { background: var(--secondary); border-radius: 10px; } ::-webkit-scrollbar-thumb:hover { background: #d03651; } </style> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap" rel="stylesheet"> </head> <body> <header> <h1 class="logo">Cinemo</h1> <p class="subtitle">Now Showing | Minimalist Dual-Tone Experience</p> </header> <div class="movie-grid"> <div class="movie-card" data-trailer="cxJ5_AzgW6E"> <div class="rating high">9.1</div> <img src="https://source.unsplash.com/featured/300x400?movie,dark" alt="Echoes of Tomorrow"> <div class="movie-info"> <h3 class="movie-title">Echoes of Tomorrow</h3> <div class="movie-meta"> <span><i class="fas fa-clock"></i> 2h 15m</span> <span><i class="fas fa-film"></i> Sci-Fi</span> </div> <p class="movie-description">A time-spanning journey that explores humanity's relationship with technology and memory in a fractured future.</p> <div class="showtimes"> <div class="time">11:30 AM</div> <div class="time">2:45 PM</div> <div class="time">6:15 PM</div> <div class="time">9:00 PM</div> </div> <div class="actions"> <button class="btn btn-primary"><i class="fas fa-ticket-alt"></i> Book Now</button> <button class="btn btn-secondary btn-trailer"><i class="fas fa-play"></i> Trailer</button> </div> </div> </div> <div class="movie-card" data-trailer="dXfduXmG2j4"> <div class="rating medium">7.6</div> <img src="https://source.unsplash.com/featured/300x400?cinema,action" alt="Midnight Outcasts"> <div class="movie-info"> <h3 class="movie-title">Midnight Outcasts</h3> <div class="movie-meta"> <span><i class="fas fa-clock"></i> 1h 58m</span> <span><i class="fas fa-film"></i> Thriller</span> </div> <p class="movie-description">When night falls, a reclusive detective must confront both inner demons and a criminal underground to save the city.</p> <div class="showtimes"> <div class="time">12:00 PM</div> <div class="time">3:30 PM</div> <div class="time">7:45 PM</div> <div class="time">10:30 PM</div> </div> <div class="actions"> <button class="btn btn-primary"><i class="fas fa-ticket-alt"></i> Book Now</button> <button class="btn btn-secondary btn-trailer"><i class="fas fa-play"></i> Trailer</button> </div> </div> </div> <div class="movie-card" data-trailer="I4tFNfROlqk"> <div class="rating high">8.8</div> <img src="https://source.unsplash.com/featured/300x400?fantasy,film" alt="Whispers of Aether"> <div class="movie-info"> <h3 class="movie-title">Whispers of Aether</h3> <div class="movie-meta"> <span><i class="fas fa-clock"></i> 2h 28m</span> <span><i class="fas fa-film"></i> Fantasy</span> </div> <p class="movie-description">In a realm where magic flows like water, one apprentice discovers ancient secrets that could save or doom her world.</p> <div class="showtimes"> <div class="time">10:15 AM</div> <div class="time">1:30 PM</div> <div class="time">5:00 PM</div> <div class="time">8:30 PM</div> </div> <div class="actions"> <button class="btn btn-primary"><i class="fas fa-ticket-alt"></i> Book Now</button> <button class="btn btn-secondary btn-trailer"><i class="fas fa-play"></i> Trailer</button> </div> </div> </div> <div class="movie-card" data-trailer="_rRoD28-WgU"> <div class="rating low">6.3</div> <img src="https://source.unsplash.com/featured/300x400?comedy,movie" alt="Weekend Misfits"> <div class="movie-info"> <h3 class="movie-title">Weekend Misfits</h3> <div class="movie-meta"> <span><i class="fas fa-clock"></i> 1h 42m</span> <span><i class="fas fa-film"></i> Comedy</span> </div> <p class="movie-description">Four former high school friends reunite for a chaotic weekend that's filled with unexpected adventures and revelations.</p> <div class="showtimes"> <div class="time">11:00 AM</div> <div class="time">2:00 PM</div> <div class="time">4:30 PM</div> <div class="time">7:15 PM</div> </div> <div class="actions"> <button class="btn btn-primary"><i class="fas fa-ticket-alt"></i> Book Now</button> <button class="btn btn-secondary btn-trailer"><i class="fas fa-play"></i> Trailer</button> </div> </div> </div> </div> <div class="trailer-modal"> <div class="trailer-content"> <button class="close-trailer"><i class="fas fa-times"></i></button> <div class="trailer-placeholder"> Loading trailer... </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const trailerModal = document.querySelector('.trailer-modal'); const trailerContent = document.querySelector('.trailer-content'); const trailerPlaceholder = document.querySelector('.trailer-placeholder'); const closeTrailer = document.querySelector('.close-trailer'); // Open trailer modal document.querySelectorAll('.btn-trailer').forEach(button => { button.addEventListener('click', (e) => { e.preventDefault(); const movieCard = button.closest('.movie-card'); const trailerKey = movieCard.dataset.trailer; // Create iframe for YouTube video const iframe = document.createElement('iframe'); iframe.src = `https://www.youtube.com/embed/${trailerKey}?autoplay=1&mute=0`; iframe.allow = "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"; iframe.allowFullscreen = true; // Replace placeholder with iframe trailerPlaceholder.style.display = 'none'; if (trailerContent.querySelector('iframe')) { trailerContent.removeChild(trailerContent.querySelector('iframe')); } trailerContent.appendChild(iframe); // Show modal trailerModal.classList.add('active'); // Prevent body scrolling document.body.style.overflow = 'hidden'; }); }); // Close trailer modal closeTrailer.addEventListener('click', () => { trailerModal.classList.remove('active'); setTimeout(() => { // Remove iframe after animation if (trailerContent.querySelector('iframe')) { trailerContent.removeChild(trailerContent.querySelector('iframe')); } trailerPlaceholder.style.display = 'flex'; }, 400); // Restore body scrolling document.body.style.overflow = ''; }); // Close modal if clicked outside content trailerModal.addEventListener('click', (e) => { if (e.target === trailerModal) { closeTrailer.click(); } }); // Book buttons interaction document.querySelectorAll('.btn-primary').forEach(button => { button.addEventListener('click', () => { const movieTitle = button.closest('.movie-info').querySelector('.movie-title').textContent; button.innerHTML = '<i class="fas fa-check"></i> Booked!'; button.style.background = '#4CAF50'; setTimeout(() => { button.innerHTML = '<i class="fas fa-ticket-alt"></i> Book Now'; button.style.background = ''; }, 2000); }); }); // Showtimes interaction document.querySelectorAll('.time').forEach(time => { time.addEventListener('click', (e) => { const times = e.target.closest('.showtimes').querySelectorAll('.time'); times.forEach(t => t.style.background = ''); e.target.style.background = var(--secondary); const bookBtn = e.target.closest('.movie-info').querySelector('.btn-primary'); bookBtn.textContent = `Book for ${e.target.textContent}`; setTimeout(() => { bookBtn.innerHTML = '<i class="fas fa-ticket-alt"></i> Book Now'; }, 2000); }); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Retro Movie Rental Cards</title> <style> @import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Special+Elite&family=Courier+Prime&display=swap'); * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Courier Prime', monospace; background-color: #1a1a1a; 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='%23333333' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E"); display: flex; justify-content: center; align-items: center; min-height: 700px; overflow-x: hidden; padding: 20px; } .container { width: 100%; max-width: 650px; margin: 0 auto; } .header { text-align: center; margin-bottom: 30px; color: #ffd700; } .header h1 { font-family: 'Bebas Neue', sans-serif; font-size: 3rem; letter-spacing: 5px; margin-bottom: 10px; text-shadow: 3px 3px 0 rgba(150, 0, 0, 0.7); } .header p { font-family: 'Special Elite', cursive; font-size: 1rem; letter-spacing: 2px; color: #d3bb6c; } .cards-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; perspective: 1000px; } .card { position: relative; height: 370px; cursor: pointer; transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1); } .card.flipped { transform: rotateY(180deg); } .card-front, .card-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4); } .card-front { background: linear-gradient(145deg, #A3856B, #806B56); padding: 15px; display: flex; flex-direction: column; border: 3px solid #d3a56c; } .card-front::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; 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='%23000000' fill-opacity='0.1' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 5v1H5V0zm1 5v1H5v-1h1z'/%3E%3C/g%3E%3C/svg%3E"); opacity: 0.2; pointer-events: none; } .card-back { background: #6B3E24; transform: rotateY(180deg); display: flex; flex-direction: column; padding: 15px; border: 3px solid #d3a56c; color: #F6E7C1; } .card-back::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: 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='%239C92AC' fill-opacity='0.1'%3E%3Cpath d='M10 10c0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6h2c0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4v2c-3.314 0-6-2.686-6-6 0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6zm25.464-1.95l8.486 8.486-1.414 1.414-8.486-8.486 1.414-1.414z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); opacity: 0.1; pointer-events: none; } .poster { width: 100%; height: 220px; object-fit: cover; margin-bottom: 15px; border-radius: 5px; filter: sepia(0.5); transition: filter 0.3s ease; border: 2px solid #9e8e6e; } .card:hover .poster { filter: sepia(0.3); } .movie-title { font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; letter-spacing: 1.5px; margin-bottom: 5px; color: #fff; text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5); } .year { font-family: 'Special Elite', cursive; font-size: 0.9rem; color: #F6E7C1; margin-bottom: 10px; } .rental-info { font-size: 0.85rem; margin-top: 10px; color: #F6E7C1; display: flex; align-items: center; gap: 5px; } .rental-info i { color: #ffd700; } .film-strip { width: 100%; height: 20px; background-image: url("data:image/svg+xml,%3Csvg width='50' height='20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h5v20H0zM10 0h5v20h-5zM20 0h5v20h-5zM30 0h5v20h-5zM40 0h5v20h-5z' fill='%23000' fill-opacity='0.8'/%3E%3C/svg%3E"); margin: 10px 0; } .back-title { font-family: 'Bebas Neue', sans-serif; font-size: 1.75rem; letter-spacing: 1.5px; color: #ffd700; text-align: center; margin-bottom: 15px; text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5); } .rental-details { flex: 1; display: flex; flex-direction: column; justify-content: space-between; } .detail-item { margin-bottom: 10px; font-family: 'Courier Prime', monospace; } .detail-label { font-weight: bold; color: #ffd700; font-size: 0.85rem; margin-bottom: 3px; font-family: 'Special Elite', cursive; } .detail-value { font-size: 0.85rem; padding-left: 5px; } .special-offer { margin-top: auto; padding: 12px; background: rgba(0, 0, 0, 0.3); border: 1px dashed #ffd700; border-radius: 5px; text-align: center; } .special-offer-title { font-family: 'Bebas Neue', sans-serif; color: #ffd700; font-size: 1.1rem; letter-spacing: 1px; margin-bottom: 5px; } .special-offer-text { font-size: 0.8rem; } .card-id { position: absolute; bottom: 10px; right: 10px; font-family: 'Special Elite', cursive; font-size: 0.7rem; color: rgba(255, 255, 255, 0.5); } .rental-button { margin-top: 15px; background: #ffd700; color: #6B3E24; border: none; padding: 8px 15px; border-radius: 5px; font-family: 'Special Elite', cursive; font-weight: bold; letter-spacing: 1px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); } .rental-button:hover { background: #f8e16c; transform: translateY(-2px); box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3); } .rental-button:active { transform: translateY(0); box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3); } .film-cell { padding: 3px; border: 2px solid #333; border-radius: 4px; display: inline-block; margin-right: 5px; vertical-align: middle; font-size: 0.7rem; background: #000; color: #fff; } .return-info { display: flex; align-items: center; margin-top: 15px; } .return-text { font-size: 0.8rem; margin-left: 5px; } .ratings { display: flex; gap: 5px; margin-top: 5px; } .star { color: #ffd700; font-size: 1rem; } .price-tag { position: absolute; top: -10px; right: -10px; background: #cc0000; color: white; font-family: 'Special Elite', cursive; padding: 5px 10px; border-radius: 50%; transform: rotate(15deg); font-size: 0.85rem; font-weight: bold; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3); border: 2px solid #fff; z-index: 2; } .scratch-effect { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.1'/%3E%3C/svg%3E"); pointer-events: none; opacity: 0.1; } /* Film reel animation */ @keyframes filmReel { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .film-reel { position: absolute; width: 40px; height: 40px; border-radius: 50%; border: 5px dashed #333; border-top: 5px dashed #ffd700; animation: filmReel 5s linear infinite; bottom: 10px; left: 10px; background: #222; z-index: 1; display: flex; justify-content: center; align-items: center; } .film-reel::before { content: ""; width: 12px; height: 12px; background: #ffd700; border-radius: 50%; } @media (max-width: 600px) { .header h1 { font-size: 2.5rem; } .header p { font-size: 0.9rem; } .cards-container { grid-template-columns: 1fr; max-width: 320px; margin: 0 auto; } } </style> </head> <body> <div class="container"> <div class="header"> <h1>CINEMANIA RENTALS</h1> <p>BE KIND, REWIND | EST. 1985</p> </div> <div class="cards-container"> <div class="card"> <div class="card-front"> <div class="price-tag">$3.99</div> <img class="poster" src="https://images.unsplash.com/photo-1599837565318-25c9ea02b014?ixlib=rb-4.0.3&auto=format&fit=crop&w=320&h=200&q=80" alt="Movie Poster"> <h3 class="movie-title">CASABLANCA</h3> <div class="year">1942 | HUMPHREY BOGART</div> <div class="ratings"> <span class="star">★</span> <span class="star">★</span> <span class="star">★</span> <span class="star">★</span> <span class="star">★</span> </div> <div class="rental-info"> <span class="film-cell">VHS</span> 3-DAY RENTAL </div> <div class="film-reel"></div> <div class="scratch-effect"></div> <div class="card-id">ID: #B82-394</div> </div> <div class="card-back"> <h3 class="back-title">CASABLANCA</h3> <div class="film-strip"></div> <div class="rental-details"> <div class="detail-item"> <div class="detail-label">DIRECTOR:</div> <div class="detail-value">Michael Curtiz</div> </div> <div class="detail-item"> <div class="detail-label">GENRE:</div> <div class="detail-value">Romance, Drama, War</div> </div> <div class="detail-item"> <div class="detail-label">RUNNING TIME:</div> <div class="detail-value">102 minutes</div> </div> <div class="detail-item"> <div class="detail-label">CONDITION:</div> <div class="detail-value">Good - Minor tracking issues</div> </div> <div class="special-offer"> <div class="special-offer-title">TUESDAY SPECIAL!</div> <div class="special-offer-text">Rent any classic film on Tuesday and get a second rental free</div> </div> <div class="return-info"> <span class="film-cell">DUE</span> <span class="return-text">Return by midnight on the third day</span> </div> <button class="rental-button">RENT NOW</button> </div> </div> </div> <div class="card"> <div class="card-front"> <div class="price-tag">$2.99</div> <img class="poster" src="https://images.unsplash.com/photo-1542204165-65bf26472b9b?ixlib=rb-4.0.3&auto=format&fit=crop&w=320&h=200&q=80" alt="Movie Poster"> <h3 class="movie-title">THE SHINING</h3> <div class="year">1980 | JACK NICHOLSON</div> <div class="ratings"> <span class="star">★</span> <span class="star">★</span> <span class="star">★</span> <span class="star">★</span> <span class="star">☆</span> </div> <div class="rental-info"> <span class="film-cell">VHS</span> WEEKEND SPECIAL </div> <div class="film-reel"></div> <div class="scratch-effect"></div> <div class="card-id">ID: #H78-111</div> </div> <div class="card-back"> <h3 class="back-title">THE SHINING</h3> <div class="film-strip"></div> <div class="rental-details"> <div class="detail-item"> <div class="detail-label">DIRECTOR:</div> <div class="detail-value">Stanley Kubrick</div> </div> <div class="detail-item"> <div class="detail-label">GENRE:</div> <div class="detail-value">Horror, Thriller</div> </div> <div class="detail-item"> <div class="detail-label">RUNNING TIME:</div> <div class="detail-value">146 minutes</div> </div> <div class="detail-item"> <div class="detail-label">CONDITION:</div> <div class="detail-value">Excellent - Recently cleaned</div> </div> <div class="special-offer"> <div class="special-offer-title">WEEKEND MARATHON!</div> <div class="special-offer-text">Rent Friday, return Monday with no late fees</div> </div> <div class="return-info"> <span class="film-cell">DUE</span> <span class="return-text">Return by Monday at 10pm</span> </div> <button class="rental-button">RENT NOW</button> </div> </div> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const cards = document.querySelectorAll('.card'); cards.forEach(card => { card.addEventListener('click', function() { this.classList.toggle('flipped'); }); // Add film grain animation effect on hover card.addEventListener('mousemove', function(e) { const rect = this.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; const centerX = rect.width / 2; const centerY = rect.height / 2; const angleX = (y - centerY) / 10; const angleY = (centerX - x) / 10; // Only apply the 3D effect if the card is not flipped if (!this.classList.contains('flipped')) { this.style.transform = `perspective(1000px) rotateX(${angleX}deg) rotateY(${angleY}deg)`; } }); card.addEventListener('mouseleave', function() { if (!this.classList.contains('flipped')) { this.style.transform = 'perspective(1000px) rotateX(0) rotateY(0)'; } }); }); // Prevent form submission for buttons const rentalButtons = document.querySelectorAll('.rental-button'); rentalButtons.forEach(button => { button.addEventListener('click', function(e) { e.stopPropagation(); // Prevent the card from flipping // Change text to show successful rental this.textContent = 'RENTED!'; this.style.background = '#2ecc71'; // Reset after 2 seconds setTimeout(() => { this.textContent = 'RENT NOW'; this.style.background = '#ffd700'; }, 2000); }); }); // Create film grain effect function createFilmGrain() { const noise = document.createElement('div'); noise.className = 'noise-overlay'; document.body.appendChild(noise); } createFilmGrain(); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>FlickPick: Mobile Movie Review Cards</title> <style> :root { --primary: #FF4D5A; --secondary: #3A54D6; --dark: #111827; --light: #F8FAFC; --accent1: #FFC700; --accent2: #3CE9B3; --accent3: #9F5FFF; --shadow: rgba(0, 0, 0, 0.1); } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; } body { background: linear-gradient(135deg, #1E1E2A, #2D2D44); display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; overflow-x: hidden; color: var(--light); } .container { width: 100%; max-width: 700px; margin: 0 auto; padding: 10px; } h1 { text-align: center; margin-bottom: 10px; font-size: 2rem; background: linear-gradient(to right, var(--primary), var(--accent3)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: titleShimmer 3s infinite alternate; } .tagline { text-align: center; margin-bottom: 30px; font-size: 0.95rem; opacity: 0.8; color: var(--light); letter-spacing: 0.5px; } .filters { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; } .filter-btn { background: rgba(255, 255, 255, 0.08); border: none; border-radius: 20px; padding: 7px 15px; color: var(--light); font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); } .filter-btn:hover, .filter-btn.active { background: var(--primary); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(255, 77, 90, 0.3); } .cards-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin-top: 20px; padding-bottom: 20px; } .card { position: relative; height: 360px; perspective: 1500px; cursor: pointer; } .card-inner { position: relative; width: 100%; height: 100%; transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1); transform-style: preserve-3d; border-radius: 12px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); } .card:hover .card-inner { transform: translateY(-5px); } .card.flipped .card-inner { transform: rotateY(180deg); } .card-front, .card-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 12px; overflow: hidden; } .card-front { background: linear-gradient(45deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4)); } .card-back { transform: rotateY(180deg); background: linear-gradient(145deg, var(--dark), #232536); padding: 20px; display: flex; flex-direction: column; justify-content: space-between; } .card-img { position: absolute; width: 100%; height: 100%; object-fit: cover; z-index: -1; opacity: 0.85; transition: transform 0.3s ease; } .card:hover .card-img { transform: scale(1.05); } .card-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 20px; background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%); } .card-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 5px; } .rating { display: flex; align-items: center; margin-bottom: 8px; } .stars { display: flex; margin-right: 10px; } .star { color: #999; font-size: 1rem; } .star.filled { color: var(--accent1); } .score { font-weight: 700; font-size: 1.1rem; color: var(--accent1); } .genre-pill { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; margin-right: 8px; background: var(--primary); color: white; } .card-flip-hint { position: absolute; top: 15px; right: 15px; background: rgba(255, 255, 255, 0.15); width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); color: var(--light); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); opacity: 0.7; transition: opacity 0.3s ease; } .card:hover .card-flip-hint { opacity: 1; animation: pulse 1.5s infinite; } .card-back-header { text-align: center; margin-bottom: 15px; } .card-back-title { font-size: 1.25rem; margin-bottom: 5px; color: var(--light); } .critic-title { font-size: 0.8rem; color: var(--accent2); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; } .review-content { font-size: 0.9rem; line-height: 1.5; margin-bottom: 15px; color: rgba(255, 255, 255, 0.8); } .review-quote { font-style: italic; border-left: 3px solid var(--primary); padding-left: 12px; margin: 15px 0; color: var(--light); } .review-meta { display: flex; justify-content: space-between; font-size: 0.8rem; color: rgba(255, 255, 255, 0.6); } .review-date { color: var(--accent3); } .critic-name { font-weight: 600; } .recommendation { text-align: center; padding: 8px; border-radius: 8px; font-weight: 700; margin-top: 10px; } .recommend-yes { background: rgba(60, 233, 179, 0.2); color: var(--accent2); } .recommend-no { background: rgba(255, 77, 90, 0.2); color: var(--primary); } .card-stats { display: flex; justify-content: space-between; margin-top: 12px; font-size: 0.8rem; color: rgba(255, 255, 255, 0.7); } .card-stat { display: flex; align-items: center; } .stat-icon { margin-right: 5px; } .swipe-hint { text-align: center; margin-top: 30px; font-size: 0.9rem; color: rgba(255, 255, 255, 0.5); display: flex; align-items: center; justify-content: center; } .swipe-icon { animation: swipeHint 2s ease-in-out infinite; margin: 0 8px; } @keyframes swipeHint { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(10px); } } @keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } } @keyframes titleShimmer { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } } /* Touch feedback effect */ .touch-feedback { position: absolute; width: 50px; height: 50px; border-radius: 50%; background: rgba(255, 255, 255, 0.3); transform: scale(0); z-index: 10; pointer-events: none; animation: touchFeedback 0.5s ease-out forwards; } @keyframes touchFeedback { 0% { transform: scale(0); opacity: 1; } 100% { transform: scale(3); opacity: 0; } } /* Mobile optimizations */ @media (max-width: 500px) { .cards-container { grid-template-columns: 1fr; } h1 { font-size: 1.7rem; } .tagline { font-size: 0.85rem; } .filter-btn { font-size: 0.75rem; padding: 6px 12px; } } </style> </head> <body> <div class="container"> <h1>FlickPick</h1> <p class="tagline">Expert movie reviews in the palm of your hand</p> <div class="filters"> <button class="filter-btn active">All</button> <button class="filter-btn">New Releases</button> <button class="filter-btn">Trending</button> <button class="filter-btn">Critics' Choice</button> <button class="filter-btn">Audience Favs</button> </div> <div class="cards-container"> <!-- Card 1 --> <div class="card"> <div class="card-inner"> <div class="card-front"> <img src="https://images.unsplash.com/photo-1626814026160-2237a95fc5a0?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1740&q=80" alt="Dune: Part Two" class="card-img"> <div class="card-content"> <h3 class="card-title">Dune: Part Two</h3> <div class="rating"> <div class="stars"> <span class="star filled">★</span> <span class="star filled">★</span> <span class="star filled">★</span> <span class="star filled">★</span> <span class="star">★</span> </div> <span class="score">4.5</span> </div> <div> <span class="genre-pill">Sci-Fi</span> <span class="genre-pill">Epic</span> </div> </div> <div class="card-flip-hint"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M9 5L15 12L9 19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </div> </div> <div class="card-back"> <div class="card-back-header"> <h3 class="card-back-title">Dune: Part Two</h3> <div class="critic-title">Critic's Review</div> </div> <div class="review-content"> <p>Villeneuve builds on the first film with expanded scope and deeper emotional resonance, delivering one of the most visually spectacular sci-fi epics of recent years.</p> <div class="review-quote"> "A breathtaking achievement in world-building that doesn't sacrifice character development." </div> </div> <div> <div class="review-meta"> <span class="critic-name">Alex Thornton</span> <span class="review-date">March 12, 2024</span> </div> <div class="recommendation recommend-yes"> Highly Recommended </div> <div class="card-stats"> <div class="card-stat"> <span class="stat-icon">👍</span> 93% </div> <div class="card-stat"> <span class="stat-icon">⏱️</span> 166 min </div> <div class="card-stat"> <span class="stat-icon">🍿</span> 89% </div> </div> </div> </div> </div> </div> <!-- Card 2 --> <div class="card"> <div class="card-inner"> <div class="card-front"> <img src="https://images.unsplash.com/photo-1485846234645-a62644f84728?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1759&q=80" alt="The Holdovers" class="card-img"> <div class="card-content"> <h3 class="card-title">The Holdovers</h3> <div class="rating"> <div class="stars"> <span class="star filled">★</span> <span class="star filled">★</span> <span class="star filled">★</span> <span class="star filled">★</span> <span class="star filled">★</span> </div> <span class="score">4.9</span> </div> <div> <span class="genre-pill">Drama</span> <span class="genre-pill">Comedy</span> </div> </div> <div class="card-flip-hint"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M9 5L15 12L9 19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </div> </div> <div class="card-back"> <div class="card-back-header"> <h3 class="card-back-title">The Holdovers</h3> <div class="critic-title">Critic's Review</div> </div> <div class="review-content"> <p>Payne's nostalgic character study shines with authentic 1970s atmosphere and outstanding performances from Giamatti and the supporting cast.</p> <div class="review-quote"> "Manages to be both warmly funny and profoundly moving, with a career-best turn from Giamatti." </div> </div> <div> <div class="review-meta"> <span class="critic-name">Maya Richards</span> <span class="review-date">February 22, 2024</span> </div> <div class="recommendation recommend-yes"> Must-See </div> <div class="card-stats"> <div class="card-stat"> <span class="stat-icon">👍</span> 97% </div> <div class="card-stat"> <span class="stat-icon">⏱️</span> 133 min </div> <div class="card-stat"> <span class="stat-icon">🍿</span> 93% </div> </div> </div> </div> </div> </div> <!-- Card 3 --> <div class="card"> <div class="card-inner"> <div class="card-front"> <img src="https://images.unsplash.com/photo-1559583109-3e7968136c99?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1587&q=80" alt="Challengers" class="card-img"> <div class="card-content"> <h3 class="card-title">Challengers</h3> <div class="rating"> <div class="stars"> <span class="star filled">★</span> <span class="star filled">★</span> <span class="star filled">★</span> <span class="star filled">★</span> <span class="star">★</span> </div> <span class="score">4.2</span> </div> <div> <span class="genre-pill">Sports</span> <span class="genre-pill">Drama</span> </div> </div> <div class="card-flip-hint"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M9 5L15 12L9 19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </div> </div> <div class="card-back"> <div class="card-back-header"> <h3 class="card-back-title">Challengers</h3> <div class="critic-title">Critic's Review</div> </div> <div class="review-content"> <p>Guadagnino's steamy tennis drama serves up a complex love triangle with kinetic energy and electric performances from Zendaya, Faist, and O'Connor.</p> <div class="review-quote"> "A stylish, sensual exploration of competition both on and off the court that keeps you guessing until the final point." </div> </div> <div> <div class="review-meta"> <span class="critic-name">Daniel Cooper</span> <span class="review-date">April 5, 2024</span> </div> <div class="recommendation recommend-yes"> Recommended </div> <div class="card-stats"> <div class="card-stat"> <span class="stat-icon">👍</span> 88% </div> <div class="card-stat"> <span class="stat-icon">⏱️</span> 131 min </div> <div class="card-stat"> <span class="stat-icon">🍿</span> 82% </div> </div> </div> </div> </div> </div> <!-- Card 4 --> <div class="card"> <div class="card-inner"> <div class="card-front"> <img src="https://images.unsplash.com/photo-1536440136628-849c177e76a1?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1625&q=80" alt="Poor Things" class="card-img"> <div class="card-content"> <h3 class="card-title">Poor Things</h3> <div class="rating"> <div class="stars"> <span class="star filled">★</span> <span class="star filled">★</span> <span class="star filled">★</span> <span class="star filled">★</span> <span class="star half">★</span> </div> <span class="score">4.7</span> </div> <div> <span class="genre-pill">Fantasy</span> <span class="genre-pill">Dark Comedy</span> </div> </div> <div class="card-flip-hint"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M9 5L15 12L9 19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </div> </div> <div class="card-back"> <div class="card-back-header"> <h3 class="card-back-title">Poor Things</h3> <div class="critic-title">Critic's Review</div> </div> <div class="review-content"> <p>Lanthimos creates a visually sumptuous, boldly feminist Frankenstein tale with a transcendent performance from Stone at its center.</p> <div class="review-quote"> "A wildly imaginative and fearless exploration of female agency and sexual liberation unlike anything else in modern cinema." </div> </div> <div> <div class="review-meta"> <span class="critic-name">Sophia Lee</span> <span class="review-date">January 15, 2024</span> </div> <div class="recommendation recommend-yes"> Highly Recommended </div> <div class="card-stats"> <div class="card-stat"> <span class="stat-icon">👍</span> 92% </div> <div class="card-stat"> <span class="stat-icon">⏱️</span> 141 min </div> <div class="card-stat"> <span class="stat-icon">🍿</span> 79% </div> </div> </div> </div> </div> </div> </div> <div class="swipe-hint"> <span>Swipe to see more reviews</span> <span class="swipe-icon">→</span> </div> </div> <script> document.addEventListener('DOMContentLoaded', () => { // Card flip functionality const cards = document.querySelectorAll('.card'); cards.forEach(card => { card.addEventListener('click', function(e) { // Create touch feedback effect const touchEffect = document.createElement('div'); touchEffect.classList.add('touch-feedback'); touchEffect.style.left = (e.offsetX - 25) + 'px'; touchEffect.style.top = (e.offsetY - 25) + 'px'; this.appendChild(touchEffect); // Provide haptic feedback if available if (navigator.vibrate) { navigator.vibrate(30); } // Toggle flip this.classList.toggle('flipped'); // Remove touch effect after animation setTimeout(() => { touchEffect.remove(); }, 500); }); }); // Filter buttons functionality 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'); // Provide haptic feedback if available if (navigator.vibrate) { navigator.vibrate(20); } // Simulate filter change with subtle animation const cardsContainer = document.querySelector('.cards-container'); cardsContainer.style.opacity = '0.6'; setTimeout(() => { cardsContainer.style.opacity = '1'; }, 300); }); }); // Swipe functionality for mobile let touchStartX = 0; let touchEndX = 0; const cardsContainer = document.querySelector('.cards-container'); cardsContainer.addEventListener('touchstart', e => { touchStartX = e.changedTouches[0].screenX; }, false); cardsContainer.addEventListener('touchend', e => { touchEndX = e.changedTouches[0].screenX; handleSwipe(); }, false); function handleSwipe() { const swipeThreshold = 50; if (touchEndX < touchStartX - swipeThreshold) { // Swipe left - simulate "next page" effect cardsContainer.style.transform = 'translateX(-20px)'; cardsContainer.style.opacity = '0.8'; setTimeout(() => { cardsContainer.style.transition = 'none'; cardsContainer.style.transform = 'translateX(0)'; cardsContainer.style.opacity = '1'; // Force reflow cardsContainer.offsetHeight; cardsContainer.style.transition = 'transform 0.3s ease, opacity 0.3s ease'; }, 300); if (navigator.vibrate) { navigator.vibrate(30); } } else if (touchEndX > touchStartX + swipeThreshold) { // Swipe right - simulate "previous page" effect cardsContainer.style.transform = 'translateX(20px)'; cardsContainer.style.opacity = '0.8'; setTimeout(() => { cardsContainer.style.transition = 'none'; cardsContainer.style.transform = 'translateX(0)'; cardsContainer.style.opacity = '1'; // Force reflow cardsContainer.offsetHeight; cardsContainer.style.transition = 'transform 0.3s ease, opacity 0.3s ease'; }, 300); if (navigator.vibrate) { navigator.vibrate(30); } } } }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Cinematica 2024 Film Festival</title> <style> @import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Montserrat:wght@300;400;600&display=swap'); :root { --primary: #ff3c4a; --secondary: #1f1f2e; --light: #f8f8f8; --dark: #121219; --accent: #4dffd2; } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Montserrat', sans-serif; background-color: var(--dark); color: var(--light); overflow-x: hidden; width: 100%; height: 100vh; display: flex; flex-direction: column; } header { padding: 1.5rem 2rem; text-align: center; background-color: var(--secondary); position: relative; overflow: hidden; z-index: 5; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); } h1 { font-family: 'Bebas Neue', sans-serif; font-size: 2.8rem; letter-spacing: 3px; margin: 0; position: relative; display: inline-block; } h1::after { content: ''; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%); width: 80px; height: 3px; background-color: var(--primary); transition: width 0.3s ease; } h1:hover::after { width: 100%; } h2 { font-weight: 300; font-size: 0.9rem; margin-top: 0.5rem; opacity: 0.8; letter-spacing: 1px; } .controls { display: flex; justify-content: space-between; align-items: center; padding: 0.8rem 2rem; background-color: rgba(31, 31, 46, 0.9); z-index: 5; } .filter-btn { background: none; border: none; color: var(--light); font-family: 'Montserrat', sans-serif; font-size: 0.85rem; cursor: pointer; padding: 0.4rem 0.8rem; border-radius: 20px; transition: all 0.3s ease; position: relative; overflow: hidden; } .filter-btn::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background-color: var(--primary); transition: width 0.3s ease; } .filter-btn:hover::after { width: 100%; } .filter-btn.active { background-color: var(--primary); box-shadow: 0 0 15px rgba(255, 60, 74, 0.5); } .search-bar { display: flex; align-items: center; background-color: rgba(18, 18, 25, 0.5); border-radius: 20px; padding: 0.3rem 0.8rem; width: 200px; transition: all 0.3s ease; } .search-bar:focus-within { box-shadow: 0 0 0 2px var(--primary); width: 240px; } .search-bar input { background: none; border: none; color: var(--light); font-family: inherit; font-size: 0.85rem; width: 100%; padding: 0.2rem 0.5rem; outline: none; } .search-bar i { color: var(--primary); font-size: 0.8rem; } .gallery-container { flex: 1; overflow-y: auto; padding: 2rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; align-content: start; scroll-behavior: smooth; } .gallery-container::-webkit-scrollbar { width: 6px; } .gallery-container::-webkit-scrollbar-track { background: rgba(31, 31, 46, 0.3); } .gallery-container::-webkit-scrollbar-thumb { background-color: var(--primary); border-radius: 3px; } .film-card { position: relative; border-radius: 8px; overflow: hidden; height: 300px; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); transform-style: preserve-3d; perspective: 1000px; } .film-card:hover { transform: translateY(-10px) scale(1.02); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5); } .film-poster { width: 100%; height: 100%; object-fit: cover; transition: all 0.5s ease; } .film-card:hover .film-poster { filter: brightness(0.3) saturate(1.2); } .film-info { position: absolute; bottom: 0; left: 0; width: 100%; padding: 1rem; background: linear-gradient(0deg, rgba(18, 18, 25, 0.9) 0%, rgba(18, 18, 25, 0) 100%); transform: translateY(70%); transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1); display: flex; flex-direction: column; gap: 0.5rem; } .film-card:hover .film-info { transform: translateY(0); } .film-title { font-family: 'Bebas Neue', sans-serif; font-size: 1.4rem; letter-spacing: 1px; margin: 0; color: var(--light); text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); } .film-meta { font-size: 0.8rem; color: var(--light); opacity: 0.8; display: flex; gap: 1rem; } .film-rating { display: flex; align-items: center; gap: 0.3rem; } .film-rating i { color: var(--primary); } .film-duration { display: flex; align-items: center; gap: 0.3rem; } .genre-tag { display: inline-block; background-color: var(--primary); color: var(--dark); font-size: 0.7rem; font-weight: 600; padding: 0.2rem 0.5rem; border-radius: 4px; margin-right: 0.3rem; transform: translateY(10px); opacity: 0; transition: all 0.3s ease 0.1s; } .film-card:hover .genre-tag { transform: translateY(0); opacity: 1; } .screening-info { margin-top: 0.5rem; font-size: 0.8rem; opacity: 0; transform: translateY(20px); transition: all 0.3s ease 0.2s; } .film-card:hover .screening-info { opacity: 1; transform: translateY(0); } .screening-time { display: flex; gap: 0.5rem; margin-top: 0.3rem; } .time-slot { background-color: rgba(255, 255, 255, 0.1); padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.75rem; cursor: pointer; position: relative; overflow: hidden; transition: all 0.3s ease; } .time-slot:hover { background-color: var(--accent); color: var(--dark); font-weight: 600; } .time-slot::before { content: ""; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); transition: 0.5s; } .time-slot:hover::before { left: 100%; } .venue { font-style: italic; margin-top: 0.3rem; font-size: 0.75rem; } .new-badge { position: absolute; top: 1rem; right: 1rem; background-color: var(--accent); color: var(--dark); font-size: 0.7rem; font-weight: bold; padding: 0.3rem 0.6rem; border-radius: 4px; transform: rotate(5deg); z-index: 2; opacity: 0; transition: all 0.3s ease; } .film-card:hover .new-badge { opacity: 1; animation: pulse 1.5s infinite; } @keyframes pulse { 0% { transform: rotate(5deg) scale(1); } 50% { transform: rotate(5deg) scale(1.1); } 100% { transform: rotate(5deg) scale(1); } } .loader { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 50px; height: 50px; border: 3px solid var(--secondary); border-radius: 50%; border-top-color: var(--primary); animation: spin 1s ease-in-out infinite; display: none; } @keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } } @media (max-width: 700px) { header { padding: 1rem; } h1 { font-size: 2rem; } .controls { flex-direction: column; gap: 1rem; padding: 1rem; } .filter-buttons { display: flex; overflow-x: auto; width: 100%; padding-bottom: 0.5rem; } .filter-buttons::-webkit-scrollbar { height: 3px; } .filter-buttons::-webkit-scrollbar-thumb { background-color: var(--primary); } .search-bar { width: 100%; } .gallery-container { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); padding: 1rem; gap: 1rem; } .film-card { height: 220px; } .film-title { font-size: 1.1rem; } } /* Animation for page load */ @keyframes fadeIn { 0% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: translateY(0); } } .film-card { animation: fadeIn 0.6s ease forwards; opacity: 0; } .film-card:nth-child(2) { animation-delay: 0.1s; } .film-card:nth-child(3) { animation-delay: 0.2s; } .film-card:nth-child(4) { animation-delay: 0.3s; } .film-card:nth-child(5) { animation-delay: 0.4s; } .film-card:nth-child(6) { animation-delay: 0.5s; } .film-card:nth-child(7) { animation-delay: 0.6s; } .film-card:nth-child(8) { animation-delay: 0.7s; } </style> </head> <body> <header> <h1>CINEMATICA 2024</h1> <h2>INTERNATIONAL FILM FESTIVAL • JUNE 5-12 • NEW YORK</h2> </header> <div class="controls"> <div class="filter-buttons"> <button class="filter-btn active" data-filter="all">All Films</button> <button class="filter-btn" data-filter="drama">Drama</button> <button class="filter-btn" data-filter="documentary">Documentary</button> <button class="filter-btn" data-filter="thriller">Thriller</button> <button class="filter-btn" data-filter="comedy">Comedy</button> <button class="filter-btn" data-filter="animation">Animation</button> </div> <div class="search-bar"> <i class="fas fa-search">🔍</i> <input type="text" placeholder="Search films..."> </div> </div> <div class="gallery-container"> <div class="film-card" data-genres="drama thriller"> <img src="https://images.unsplash.com/photo-1611159063981-b8c8c4301869?ixlib=rb-1.2.1&auto=format&fit=crop&w=668&q=80" alt="Echoes of Tomorrow" class="film-poster"> <div class="new-badge">PREMIERE</div> <div class="film-info"> <h3 class="film-title">Echoes of Tomorrow</h3> <div class="film-meta"> <div class="film-rating"><i class="fas fa-star">★</i> 4.8</div> <div class="film-duration"><i class="fas fa-clock">⏱</i> 118 min</div> </div> <div> <span class="genre-tag">Drama</span> <span class="genre-tag">Thriller</span> </div> <div class="screening-info"> <div>June 6th</div> <div class="screening-time"> <div class="time-slot">14:30</div> <div class="time-slot">20:15</div> </div> <div class="venue">Lincoln Center, Theater 2</div> </div> </div> </div> <div class="film-card" data-genres="documentary"> <img src="https://images.unsplash.com/photo-1524781289445-ddf8f5695861?ixlib=rb-1.2.1&auto=format&fit=crop&w=1500&q=80" alt="Oceans Beneath" class="film-poster"> <div class="film-info"> <h3 class="film-title">Oceans Beneath</h3> <div class="film-meta"> <div class="film-rating"><i class="fas fa-star">★</i> 4.6</div> <div class="film-duration"><i class="fas fa-clock">⏱</i> 97 min</div> </div> <div> <span class="genre-tag">Documentary</span> </div> <div class="screening-info"> <div>June 7th</div> <div class="screening-time"> <div class="time-slot">13:00</div> <div class="time-slot">18:45</div> </div> <div class="venue">MoMA, Screening Room A</div> </div> </div> </div> <div class="film-card" data-genres="comedy drama"> <img src="https://images.unsplash.com/photo-1517604931442-7e0c8ed2963c?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="Summer in Kyoto" class="film-poster"> <div class="film-info"> <h3 class="film-title">Summer in Kyoto</h3> <div class="film-meta"> <div class="film-rating"><i class="fas fa-star">★</i> 4.3</div> <div class="film-duration"><i class="fas fa-clock">⏱</i> 112 min</div> </div> <div> <span class="genre-tag">Comedy</span> <span class="genre-tag">Drama</span> </div> <div class="screening-info"> <div>June 8th</div> <div class="screening-time"> <div class="time-slot">15:15</div> <div class="time-slot">21:00</div> </div> <div class="venue">Angelika Film Center</div> </div> </div> </div> <div class="film-card" data-genres="thriller"> <img src="https://images.unsplash.com/photo-1536440136628-849c177e76a1?ixlib=rb-1.2.1&auto=format&fit=crop&w=625&q=80" alt="The Last Night" class="film-poster"> <div class="new-badge">PREMIERE</div> <div class="film-info"> <h3 class="film-title">The Last Night</h3> <div class="film-meta"> <div class="film-rating"><i class="fas fa-star">★</i> 4.7</div> <div class="film-duration"><i class="fas fa-clock">⏱</i> 124 min</div> </div> <div> <span class="genre-tag">Thriller</span> </div> <div class="screening-info"> <div>June 9th</div> <div class="screening-time"> <div class="time-slot">16:45</div> <div class="time-slot">21:30</div> </div> <div class="venue">Tribeca Grand Screening Room</div> </div> </div> </div> <div class="film-card" data-genres="animation comedy"> <img src="https://images.unsplash.com/photo-1534447677768-be436bb09401?ixlib=rb-1.2.1&auto=format&fit=crop&w=1071&q=80" alt="Cloud Chasers" class="film-poster"> <div class="film-info"> <h3 class="film-title">Cloud Chasers</h3> <div class="film-meta"> <div class="film-rating"><i class="fas fa-star">★</i> 4.9</div> <div class="film-duration"><i class="fas fa-clock">⏱</i> 89 min</div> </div> <div> <span class="genre-tag">Animation</span> <span class="genre-tag">Comedy</span> </div> <div class="screening-info"> <div>June 10th</div> <div class="screening-time"> <div class="time-slot">11:00</div> <div class="time-slot">16:30</div> </div> <div class="venue">BAM Rose Cinemas</div> </div> </div> </div> <div class="film-card" data-genres="drama"> <img src="https://images.unsplash.com/photo-1485846234645-a62644f84728?ixlib=rb-1.2.1&auto=format&fit=crop&w=1040&q=80" alt="Portraits of Solitude" class="film-poster"> <div class="film-info"> <h3 class="film-title">Portraits of Solitude</h3> <div class="film-meta"> <div class="film-rating"><i class="fas fa-star">★</i> 4.5</div> <div class="film-duration"><i class="fas fa-clock">⏱</i> 134 min</div> </div> <div> <span class="genre-tag">Drama</span> </div> <div class="screening-info"> <div>June 11th</div> <div class="screening-time"> <div class="time-slot">14:00</div> <div class="time-slot">19:45</div> </div> <div class="venue">IFC Center</div> </div> </div> </div> <div class="film-card" data-genres="documentary"> <img src="https://images.unsplash.com/photo-1468276311594-df7cb65d8df6?ixlib=rb-1.2.1&auto=format&fit=crop&w=1050&q=80" alt="Chasing the Beat" class="film-poster"> <div class="film-info"> <h3 class="film-title">Chasing the Beat</h3> <div class="film-meta"> <div class="film-rating"><i class="fas fa-star">★</i> 4.4</div> <div class="film-duration"><i class="fas fa-clock">⏱</i> 105 min</div> </div> <div> <span class="genre-tag">Documentary</span> </div> <div class="screening-info"> <div>June 12th</div> <div class="screening-time"> <div class="time-slot">13:30</div> <div class="time-slot">18:15</div> </div> <div class="venue">Nitehawk Cinema</div> </div> </div> </div> <div class="film-card" data-genres="thriller drama"> <img src="https://images.unsplash.com/photo-1504707748692-419802cf939d?ixlib=rb-1.2.1&auto=format&fit=crop&w=1047&q=80" alt="Midnight Highway" class="film-poster"> <div class="film-info"> <h3 class="film-title">Midnight Highway</h3> <div class="film-meta"> <div class="film-rating"><i class="fas fa-star">★</i> 4.2</div> <div class="film-duration"><i class="fas fa-clock">⏱</i> 117 min</div> </div> <div> <span class="genre-tag">Thriller</span> <span class="genre-tag">Drama</span> </div> <div class="screening-info"> <div>June 5th</div> <div class="screening-time"> <div class="time-slot">15:45</div> <div class="time-slot">20:30</div> </div> <div class="venue">Film Society Lincoln Center</div> </div> </div> </div> </div> <div class="loader"></div> <script> document.addEventListener('DOMContentLoaded', function() { const filterButtons = document.querySelectorAll('.filter-btn'); const filmCards = document.querySelectorAll('.film-card'); const searchInput = document.querySelector('.search-bar input'); const loader = document.querySelector('.loader'); // Filter functionality filterButtons.forEach(button => { button.addEventListener('click', function() { // Show loader for a brief moment loader.style.display = 'block'; // Remove active class from all buttons filterButtons.forEach(btn => btn.classList.remove('active')); // Add active class to clicked button this.classList.add('active'); const filter = this.getAttribute('data-filter'); // Hide all cards first filmCards.forEach(card => { card.style.display = 'none'; }); setTimeout(() => { // Show cards based on filter filmCards.forEach(card => { if (filter === 'all') { card.style.display = 'block'; setTimeout(() => { card.style.opacity = '1'; }, 100); } else { const genres = card.getAttribute('data-genres'); if (genres.includes(filter)) { card.style.display = 'block'; setTimeout(() => { card.style.opacity = '1'; }, 100); } } }); // Hide loader loader.style.display = 'none'; }, 400); }); }); // Search functionality searchInput.addEventListener('input', function() { const searchTerm = this.value.toLowerCase(); filmCards.forEach(card => { const title = card.querySelector('.film-title').textContent.toLowerCase(); if (title.includes(searchTerm)) { card.style.display = 'block'; } else { card.style.display = 'none'; } }); }); // Time slot selection effect const timeSlots = document.querySelectorAll('.time-slot'); timeSlots.forEach(slot => { slot.addEventListener('click', function() { // Toggle active state if (this.classList.contains('active')) { this.classList.remove('active'); this.style.backgroundColor = ''; } else { // Find siblings in the same screening time container const siblings = this.parentElement.querySelectorAll('.time-slot'); siblings.forEach(sib => { sib.classList.remove('active'); sib.style.backgroundColor = ''; }); this.classList.add('active'); this.style.backgroundColor = 'var(--accent)'; } }); }); // Add dynamic poster zoom effect filmCards.forEach(card => { card.addEventListener('mousemove', function(e) { const poster = this.querySelector('.film-poster'); const rect = this.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; const xPercent = (x / rect.width) * 100; const yPercent = (y / rect.height) * 100; poster.style.transform = `scale(1.1) translate(${(50 - xPercent) / 20}%, ${(50 - yPercent) / 20}%)`; }); card.addEventListener('mouseleave', function() { const poster = this.querySelector('.film-poster'); poster.style.transform = 'scale(1) translate(0, 0)'; }); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> :root { --primary-color: #d4c7be; --secondary-color: #635d58; --accent-color: #a7323a; --text-color: #2a2522; --light-color: #f5f1ed; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Courier New', monospace; } body { background-color: var(--light-color); color: var(--text-color); width: 100%; height: 100%; overflow-x: hidden; display: flex; flex-direction: column; align-items: center; padding: 20px; } .container { width: 100%; max-width: 660px; padding: 10px; } header { text-align: center; margin-bottom: 30px; position: relative; } h1 { font-size: 2.2rem; letter-spacing: -1px; margin-bottom: 10px; position: relative; display: inline-block; } h1::after { content: ""; position: absolute; bottom: -5px; left: 0; width: 100%; height: 3px; background-image: url("data:image/svg+xml,%3Csvg width='100' height='3' viewBox='0 0 100 3' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 1.5C20 1.5 20 3 40 3C60 3 60 0 80 0C100 0 100 1.5 100 1.5' stroke='%23a7323a' stroke-width='1'/%3E%3C/svg%3E"); background-size: 100px 3px; background-repeat: repeat-x; } .subtitle { font-size: 0.9rem; color: var(--secondary-color); font-style: italic; margin-bottom: 15px; } .search-container { position: relative; margin-bottom: 30px; } .search-input { width: 100%; padding: 12px 15px; font-size: 0.9rem; border: none; background-color: var(--light-color); border-bottom: 1px solid var(--secondary-color); transition: all 0.3s ease; } .search-input:focus { outline: none; border-color: var(--accent-color); } .search-icon { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--secondary-color); } .filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; justify-content: center; } .filter-btn { background: none; border: 1px dashed var(--secondary-color); padding: 6px 12px; border-radius: 20px; font-size: 0.8rem; color: var(--secondary-color); cursor: pointer; transition: all 0.3s ease; } .filter-btn:hover, .filter-btn.active { background-color: var(--secondary-color); color: var(--light-color); } .film-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; } .film-card { position: relative; height: 280px; border-radius: 3px; overflow: hidden; transition: transform 0.3s ease; background-color: var(--primary-color); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); } .film-card:hover { transform: translateY(-5px); } .card-image { height: 70%; width: 100%; background-size: cover; background-position: center; position: relative; overflow: hidden; } .hand-drawn-frame { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3' y='3' width='194' height='194' stroke='%232a2522' stroke-width='2' stroke-dasharray='8 4'/%3E%3C/svg%3E"); background-size: 100% 100%; pointer-events: none; } .card-content { padding: 10px; background-color: var(--primary-color); height: 30%; display: flex; flex-direction: column; justify-content: space-between; } .film-title { font-size: 0.95rem; font-weight: bold; margin-bottom: 5px; } .film-director { font-size: 0.8rem; color: var(--secondary-color); font-style: italic; } .film-year { font-size: 0.75rem; color: var(--accent-color); align-self: flex-end; } .card-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(42, 37, 34, 0.9); color: var(--light-color); padding: 15px; opacity: 0; transition: opacity 0.3s ease; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; } .film-card:hover .card-overlay { opacity: 1; pointer-events: auto; } .overlay-title { font-size: 1rem; margin-bottom: 10px; text-decoration: underline; text-decoration-style: wavy; text-decoration-color: var(--accent-color); } .overlay-synopsis { font-size: 0.8rem; margin-bottom: 15px; line-height: 1.4; } .overlay-director-note { font-size: 0.75rem; font-style: italic; position: relative; padding-left: 20px; } .overlay-director-note::before { content: """; position: absolute; left: 0; top: -5px; font-size: 1.5rem; color: var(--accent-color); } .overlay-links { display: flex; justify-content: space-between; } .overlay-link { font-size: 0.8rem; color: var(--primary-color); text-decoration: none; position: relative; transition: color 0.3s ease; } .overlay-link:hover { color: var(--accent-color); } .overlay-link::after { content: ""; position: absolute; bottom: -2px; left: 0; width: 100%; height: 1px; background-color: var(--accent-color); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease; } .overlay-link:hover::after { transform: scaleX(1); } .pagination { display: flex; justify-content: center; gap: 10px; margin-top: 20px; } .page-btn { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--secondary-color); background: none; border-radius: 3px; cursor: pointer; transition: all 0.3s ease; } .page-btn:hover, .page-btn.active { background-color: var(--secondary-color); color: var(--light-color); } .loading-animation { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 50px; height: 50px; border-radius: 50%; border: 3px solid var(--primary-color); border-top-color: var(--accent-color); animation: spin 1s infinite linear; display: none; } @keyframes spin { 0% { transform: translate(-50%, -50%) rotate(0deg); } 100% { transform: translate(-50%, -50%) rotate(360deg); } } .film-card.loading .card-image, .film-card.loading .card-content { opacity: 0.5; } .film-card.loading .loading-animation { display: block; } .cursor { position: fixed; width: 20px; height: 20px; border-radius: 50%; background-color: var(--accent-color); transform: translate(-50%, -50%); pointer-events: none; mix-blend-mode: difference; z-index: 9999; opacity: 0; transition: opacity 0.3s ease; } @media (max-width: 600px) { .film-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } .film-card { height: 250px; } h1 { font-size: 1.8rem; } .subtitle { font-size: 0.8rem; } .cursor { display: none; } } @media (max-width: 400px) { .film-grid { grid-template-columns: 1fr 1fr; gap: 15px; } .filter-btn { padding: 5px 10px; font-size: 0.7rem; } } .film-tag { position: absolute; top: 10px; right: 10px; background-color: var(--accent-color); color: var(--light-color); font-size: 0.7rem; padding: 2px 6px; border-radius: 3px; transform: rotate(3deg); } .hand-drawn-annotation { position: absolute; font-family: 'Courier New', cursive; color: var(--accent-color); font-size: 0.75rem; transform: rotate(-5deg); bottom: 30%; right: 5px; filter: drop-shadow(1px 1px 0px var(--light-color)); } </style> </head> <body> <div class="cursor"></div> <div class="container"> <header> <h1>CINEMA OBSCURA</h1> <div class="subtitle">A curated collection of independent and art-house films</div> </header> <div class="search-container"> <input type="text" class="search-input" placeholder="Search by title, director, or keywords..."> <div class="search-icon">🔍</div> </div> <div class="filters"> <button class="filter-btn active">All</button> <button class="filter-btn">Drama</button> <button class="filter-btn">Documentary</button> <button class="filter-btn">Experimental</button> <button class="filter-btn">Animation</button> <button class="filter-btn">Award Winners</button> </div> <div class="film-grid"> <!-- Card 1 --> <div class="film-card"> <div class="card-image" style="background-image: url('https://source.unsplash.com/random/300x400/?film,moody')"> <div class="hand-drawn-frame"></div> <div class="film-tag">Jury Award</div> </div> <div class="card-content"> <div class="film-title">Lost in Translation</div> <div class="film-director">Sofia Coppola</div> <div class="film-year">2003</div> </div> <div class="card-overlay"> <div> <div class="overlay-title">Lost in Translation</div> <div class="overlay-synopsis">A faded movie star and a neglected young woman form an unlikely bond after crossing paths in Tokyo, exploring themes of isolation and connection.</div> </div> <div> <div class="overlay-director-note">I wanted to capture that feeling of being disconnected in a place where you don't speak the language.</div> <div class="overlay-links"> <a href="#" class="overlay-link">Screenings</a> <a href="#" class="overlay-link">Details</a> </div> </div> </div> <div class="loading-animation"></div> <div class="hand-drawn-annotation">Must see!</div> </div> <!-- Card 2 --> <div class="film-card"> <div class="card-image" style="background-image: url('https://source.unsplash.com/random/300x400/?french,film')"> <div class="hand-drawn-frame"></div> </div> <div class="card-content"> <div class="film-title">Amélie</div> <div class="film-director">Jean-Pierre Jeunet</div> <div class="film-year">2001</div> </div> <div class="card-overlay"> <div> <div class="overlay-title">Amélie</div> <div class="overlay-synopsis">A whimsical young woman decides to change the lives of those around her while struggling with her own isolation.</div> </div> <div> <div class="overlay-director-note">The film is about small pleasures, how to be connected with the world around you.</div> <div class="overlay-links"> <a href="#" class="overlay-link">Screenings</a> <a href="#" class="overlay-link">Details</a> </div> </div> </div> <div class="loading-animation"></div> </div> <!-- Card 3 --> <div class="film-card"> <div class="card-image" style="background-image: url('https://source.unsplash.com/random/300x400/?moonlight,dark')"> <div class="hand-drawn-frame"></div> <div class="film-tag">Best Picture</div> </div> <div class="card-content"> <div class="film-title">Moonlight</div> <div class="film-director">Barry Jenkins</div> <div class="film-year">2016</div> </div> <div class="card-overlay"> <div> <div class="overlay-title">Moonlight</div> <div class="overlay-synopsis">A young African-American man grapples with his identity and sexuality while experiencing the everyday struggles of childhood, adolescence, and adulthood.</div> </div> <div> <div class="overlay-director-note">This film is deeply personal, a journey through the chapters of a life structured as healing poetry.</div> <div class="overlay-links"> <a href="#" class="overlay-link">Screenings</a> <a href="#" class="overlay-link">Details</a> </div> </div> </div> <div class="loading-animation"></div> <div class="hand-drawn-annotation">Brilliant!</div> </div> <!-- Card 4 --> <div class="film-card"> <div class="card-image" style="background-image: url('https://source.unsplash.com/random/300x400/?animated,art')"> <div class="hand-drawn-frame"></div> </div> <div class="card-content"> <div class="film-title">Persepolis</div> <div class="film-director">Marjane Satrapi</div> <div class="film-year">2007</div> </div> <div class="card-overlay"> <div> <div class="overlay-title">Persepolis</div> <div class="overlay-synopsis">A poignant coming-of-age story about a young girl in Iran during the Islamic Revolution, told through stark black-and-white animation.</div> </div> <div> <div class="overlay-director-note">I wanted to show that not all Iranians are fundamentalists or terrorists. We love life and have a great sense of humor.</div> <div class="overlay-links"> <a href="#" class="overlay-link">Screenings</a> <a href="#" class="overlay-link">Details</a> </div> </div> </div> <div class="loading-animation"></div> </div> <!-- Card 5 --> <div class="film-card"> <div class="card-image" style="background-image: url('https://source.unsplash.com/random/300x400/?documentary,nature')"> <div class="hand-drawn-frame"></div> </div> <div class="card-content"> <div class="film-title">Honeyland</div> <div class="film-director">Tamara Kotevska</div> <div class="film-year">2019</div> </div> <div class="card-overlay"> <div> <div class="overlay-title">Honeyland</div> <div class="overlay-synopsis">The last female bee-hunter in Europe must save the bees and return the natural balance when a family of nomadic beekeepers invade her land.</div> </div> <div> <div class="overlay-director-note">The film was made with a deep respect for nature and acts as a stark warning about the exploitation of natural resources.</div> <div class="overlay-links"> <a href="#" class="overlay-link">Screenings</a> <a href="#" class="overlay-link">Details</a> </div> </div> </div> <div class="loading-animation"></div> </div> <!-- Card 6 --> <div class="film-card"> <div class="card-image" style="background-image: url('https://source.unsplash.com/random/300x400/?experimental,art')"> <div class="hand-drawn-frame"></div> <div class="film-tag">Experimental</div> </div> <div class="card-content"> <div class="film-title">Synecdoche, New York</div> <div class="film-director">Charlie Kaufman</div> <div class="film-year">2008</div> </div> <div class="card-overlay"> <div> <div class="overlay-title">Synecdoche, New York</div> <div class="overlay-synopsis">A theater director struggles with his work, and the women in his life, as he creates a life-size replica of New York City inside a warehouse.</div> </div> <div> <div class="overlay-director-note">I'm interested in the way people build narratives out of the randomness of existence to try to make sense of things.</div> <div class="overlay-links"> <a href="#" class="overlay-link">Screenings</a> <a href="#" class="overlay-link">Details</a> </div> </div> </div> <div class="loading-animation"></div> <div class="hand-drawn-annotation">Complex!</div> </div> </div> <div class="pagination"> <button class="page-btn active">1</button> <button class="page-btn">2</button> <button class="page-btn">3</button> <button class="page-btn">4</button> <button class="page-btn">→</button> </div> </div> <script> // Custom cursor effect const cursor = document.querySelector('.cursor'); if (window.innerWidth > 600) { document.addEventListener('mousemove', (e) => { cursor.style.opacity = '1'; cursor.style.left = e.clientX + 'px'; cursor.style.top = e.clientY + 'px'; }); document.addEventListener('mouseleave', () => { cursor.style.opacity = '0'; }); } // Filter buttons const filterButtons = document.querySelectorAll('.filter-btn'); filterButtons.forEach(button => { button.addEventListener('click', () => { // Remove active class from all buttons filterButtons.forEach(btn => btn.classList.remove('active')); // Add active class to clicked button button.classList.add('active'); // Simulate loading state const filmCards = document.querySelectorAll('.film-card'); filmCards.forEach(card => { card.classList.add('loading'); setTimeout(() => { card.classList.remove('loading'); }, 800); }); }); }); // Pagination const pageButtons = document.querySelectorAll('.page-btn'); pageButtons.forEach(button => { button.addEventListener('click', () => { // Remove active class from all buttons pageButtons.forEach(btn => btn.classList.remove('active')); // Add active class to clicked button if (button.innerText !== '→') { button.classList.add('active'); } // Simulate loading state const filmCards = document.querySelectorAll('.film-card'); filmCards.forEach(card => { card.classList.add('loading'); setTimeout(() => { card.classList.remove('loading'); }, 800); }); }); }); // Search functionality (simulated) const searchInput = document.querySelector('.search-input'); searchInput.addEventListener('keyup', (e) => { if (e.key === 'Enter') { // Simulate loading state const filmCards = document.querySelectorAll('.film-card'); filmCards.forEach(card => { card.classList.add('loading'); setTimeout(() => { card.classList.remove('loading'); }, 800); }); // Clear the input setTimeout(() => { searchInput.blur(); }, 100); } }); // Adding random animations to elements with hand-drawn aesthetic const handDrawnElements = document.querySelectorAll('.hand-drawn-annotation'); handDrawnElements.forEach(element => { element.style.transform = `rotate(${-5 + Math.random() * 10}deg)`; }); // Card hover effect enhancements const filmCards = document.querySelectorAll('.film-card'); filmCards.forEach(card => { card.addEventListener('mouseenter', () => { card.style.transform = 'translateY(-5px) scale(1.02)'; }); card.addEventListener('mouseleave', () => { card.style.transform = 'translateY(0) scale(1)'; }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Documentary Streaming Portal</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Helvetica Neue', Arial, sans-serif; } body { background-color: #131313; color: #f0f0f0; padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; min-height: 700px; max-width: 700px; margin: 0 auto; overflow-x: hidden; } header { width: 100%; margin-bottom: 25px; text-align: center; } h1 { font-size: 28px; font-weight: 200; letter-spacing: 1.5px; margin-bottom: 12px; color: #ffffff; } .subtitle { font-size: 14px; font-weight: 300; color: #a0a0a0; max-width: 80%; margin: 0 auto; line-height: 1.4; } .filters { display: flex; gap: 10px; margin-bottom: 25px; flex-wrap: wrap; justify-content: center; } .filter-btn { background-color: #2a2a2a; color: #d0d0d0; border: none; padding: 8px 16px; border-radius: 20px; font-size: 13px; cursor: pointer; transition: all 0.3s ease; outline: none; } .filter-btn:hover { background-color: #3a3a3a; } .filter-btn.active { background-color: #4c4c4c; color: #ffffff; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1); } .cards-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; width: 100%; } .documentary-card { background-color: #1d1d1d; border-radius: 8px; overflow: hidden; position: relative; height: 320px; cursor: pointer; transition: transform 0.4s ease, box-shadow 0.4s ease; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); } .documentary-card:hover { transform: translateY(-5px); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3); } .card-image { width: 100%; height: 160px; background-size: cover; background-position: center; position: relative; filter: grayscale(90%); transition: filter 0.5s ease, transform 0.5s ease; } .documentary-card:hover .card-image { filter: grayscale(0%); transform: scale(1.05); } .card-category { position: absolute; top: 10px; right: 10px; padding: 4px 8px; border-radius: 3px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; z-index: 10; } .category-nature { background-color: #4A8F31; color: white; } .category-politics { background-color: #B94A48; color: white; } .category-science { background-color: #3A87AD; color: white; } .category-culture { background-color: #C6A530; color: white; } .card-content { padding: 15px; position: relative; z-index: 2; } .card-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; color: #ffffff; } .card-metadata { display: flex; font-size: 12px; color: #a0a0a0; margin-bottom: 12px; align-items: center; } .metadata-item { display: flex; align-items: center; margin-right: 12px; } .metadata-item svg { margin-right: 4px; height: 12px; width: 12px; } .card-description { font-size: 13px; color: #b8b8b8; line-height: 1.4; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; transition: all 0.3s ease; } .card-progress { height: 3px; width: 100%; background-color: #333333; position: relative; margin-top: auto; border-radius: 2px; overflow: hidden; } .progress-bar { height: 100%; background: linear-gradient(90deg, var(--accent-color) 0%, rgba(255,255,255,0.7) 100%); width: 0; transition: width 0.8s ease-in-out; position: absolute; top: 0; left: 0; } .card-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; } .watch-btn { background-color: transparent; border: 1px solid rgba(255, 255, 255, 0.2); color: #ffffff; padding: 6px 14px; border-radius: 4px; cursor: pointer; font-size: 12px; transition: all 0.3s ease; display: flex; align-items: center; gap: 5px; } .watch-btn:hover { background-color: var(--accent-color); border-color: var(--accent-color); color: #000; } .bookmark-btn { background-color: transparent; border: none; cursor: pointer; color: #a0a0a0; display: flex; align-items: center; transition: color 0.3s ease; } .bookmark-btn:hover { color: var(--accent-color); } .bookmark-btn svg { height: 18px; width: 18px; } .detail-view { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.9); z-index: 1000; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; backdrop-filter: blur(5px); } .detail-view.active { opacity: 1; pointer-events: auto; } .detail-content { background-color: #1d1d1d; max-width: 650px; width: 90%; max-height: 90vh; border-radius: 8px; position: relative; transform: scale(0.9); transition: transform 0.4s ease; overflow: hidden; display: flex; flex-direction: column; } .detail-view.active .detail-content { transform: scale(1); } .detail-header { position: relative; height: 220px; } .detail-image { width: 100%; height: 100%; object-fit: cover; filter: grayscale(80%); } .detail-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(29,29,29,1) 0%, rgba(29,29,29,0) 100%); height: 80px; } .close-detail { position: absolute; top: 15px; right: 15px; background-color: rgba(0, 0, 0, 0.5); border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 10; transition: background-color 0.3s ease; } .close-detail:hover { background-color: rgba(0, 0, 0, 0.8); } .close-detail svg { width: 18px; height: 18px; color: white; } .detail-info { padding: 20px; overflow-y: auto; } .detail-title { font-size: 24px; font-weight: 600; margin-bottom: 10px; color: #ffffff; } .detail-meta { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 20px; } .detail-meta-item { display: flex; align-items: center; font-size: 13px; color: #a0a0a0; } .detail-meta-item svg { margin-right: 6px; height: 16px; width: 16px; } .detail-category { display: inline-block; padding: 4px 10px; border-radius: 3px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-right: 10px; } .detail-description { font-size: 15px; line-height: 1.6; color: #d0d0d0; margin-bottom: 20px; } .detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; } .tag { background-color: #2a2a2a; color: #d0d0d0; padding: 4px 10px; border-radius: 20px; font-size: 12px; } .detail-actions { display: flex; align-items: center; gap: 10px; margin-top: 20px; } .detail-watch-btn { background-color: var(--accent-color); color: #000000; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; transition: all 0.3s ease; } .detail-watch-btn:hover { background-color: var(--accent-hover); } .detail-action-btn { background-color: transparent; border: 1px solid rgba(255, 255, 255, 0.2); color: #ffffff; padding: 10px; border-radius: 4px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; } .detail-action-btn:hover { background-color: #2a2a2a; border-color: #2a2a2a; } .detail-action-btn svg { width: 18px; height: 18px; } .similar-section { margin-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 20px; } .similar-title { font-size: 16px; font-weight: 600; margin-bottom: 15px; color: #ffffff; } .similar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; } .similar-item { position: relative; height: 80px; border-radius: 4px; overflow: hidden; cursor: pointer; } .similar-img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(90%); transition: filter 0.3s ease, transform 0.3s ease; } .similar-item:hover .similar-img { filter: grayscale(0%); transform: scale(1.05); } .similar-title-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%); padding: 10px 8px 6px; font-size: 11px; color: #ffffff; } /* Loading indicator */ .loading-indicator { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; display: none; } .loading-indicator svg { animation: spin 1.2s linear infinite; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .search-container { width: 100%; margin-bottom: 20px; position: relative; display: flex; } .search-input { flex-grow: 1; background-color: #2a2a2a; border: none; padding: 10px 15px 10px 40px; border-radius: 4px; color: #f0f0f0; font-size: 14px; outline: none; transition: background-color 0.3s ease; } .search-input:focus { background-color: #333333; } .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #909090; width: 16px; height: 16px; } @media (max-width: 600px) { .cards-container { grid-template-columns: 1fr; } .documentary-card { height: auto; min-height: 280px; } h1 { font-size: 24px; } .detail-title { font-size: 20px; } .detail-header { height: 180px; } .similar-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); } } /* Theme specific css variables */ .theme-nature { --accent-color: #4A8F31; --accent-hover: #3c7328; } .theme-politics { --accent-color: #B94A48; --accent-hover: #9c3e3c; } .theme-science { --accent-color: #3A87AD; --accent-hover: #2f6d8a; } .theme-culture { --accent-color: #C6A530; --accent-hover: #a88b28; } /* Key animation */ @keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } } /* Expanded state for card description */ .documentary-card.expanded .card-description { -webkit-line-clamp: unset; max-height: 200px; } /* Custom scroll */ ::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-track { background: #1d1d1d; } ::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 3px; } ::-webkit-scrollbar-thumb:hover { background: #4a4a4a; } </style> </head> <body> <header> <h1>VIEWPOINT</h1> <p class="subtitle">Explore thought-provoking documentaries that challenge perspectives and illuminate unseen worlds</p> </header> <div class="search-container"> <svg class="search-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <circle cx="11" cy="11" r="8"></circle> <line x1="21" y1="21" x2="16.65" y2="16.65"></line> </svg> <input type="text" class="search-input" placeholder="Search documentaries..."> </div> <div class="filters"> <button class="filter-btn active" data-filter="all">All</button> <button class="filter-btn" data-filter="nature">Nature</button> <button class="filter-btn" data-filter="politics">Politics</button> <button class="filter-btn" data-filter="science">Science</button> <button class="filter-btn" data-filter="culture">Culture</button> </div> <div class="cards-container"> <!-- Card 1 --> <div class="documentary-card theme-nature" data-category="nature"> <div class="card-image" style="background-image: url('https://images.unsplash.com/photo-1518709766631-a6a7f45921c3?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=600&q=80')"> <div class="card-category category-nature">Nature</div> </div> <div class="card-content"> <h3 class="card-title">The Last Wilderness</h3> <div class="card-metadata"> <div class="metadata-item"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <circle cx="12" cy="12" r="10"></circle> <polyline points="12 6 12 12 16 14"></polyline> </svg> <span>68 min</span> </div> <div class="metadata-item"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3z"></path> <path d="M19 10v2a7 7 0 0 1-14 0v-2"></path> <line x1="12" y1="19" x2="12" y2="22"></line> </svg> <span>EN</span> </div> </div> <p class="card-description">A haunting exploration of Earth's last truly wild places and the species fighting for survival in increasingly fragmented habitats.</p> <div class="card-progress"> <div class="progress-bar" style="width: 35%"></div> </div> <div class="card-actions"> <button class="watch-btn"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polygon points="5 3 19 12 5 21 5 3"></polygon> </svg> Watch </button> <button class="bookmark-btn"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z"></path> </svg> </button> </div> </div> </div> <!-- Card 2 --> <div class="documentary-card theme-politics" data-category="politics"> <div class="card-image" style="background-image: url('https://images.unsplash.com/photo-1577058005446-f7f5fad33160?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=600&q=80')"> <div class="card-category category-politics">Politics</div> </div> <div class="card-content"> <h3 class="card-title">Power Structures</h3> <div class="card-metadata"> <div class="metadata-item"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <circle cx="12" cy="12" r="10"></circle> <polyline points="12 6 12 12 16 14"></polyline> </svg> <span>92 min</span> </div> <div class="metadata-item"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3z"></path> <path d="M19 10v2a7 7 0 0 1-14 0v-2"></path> <line x1="12" y1="19" x2="12" y2="22"></line> </svg> <span>EN</span> </div> </div> <p class="card-description">An investigative deep-dive into how modern political systems operate behind closed doors and the invisible networks that influence global decision-making.</p> <div class="card-progress"> <div class="progress-bar" style="width: 0%"></div> </div> <div class="card-actions"> <button class="watch-btn"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polygon points="5 3 19 12 5 21 5 3"></polygon> </svg> Watch </button> <button class="bookmark-btn"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z"></path> </svg> </button> </div> </div> </div> <!-- Card 3 --> <div class="documentary-card theme-science" data-category="science"> <div class="card-image" style="background-image: url('https://images.unsplash.com/photo-1617791160536-598cf32026fb?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=600&q=80')"> <div class="card-category category-science">Science</div> </div> <div class="card-content"> <h3 class="card-title">Beyond the Cosmos</h3> <div class="card-metadata"> <div class="metadata-item"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <circle cx="12" cy="12" r="10"></circle> <polyline points="12 6 12 12 16 14"></polyline> </svg> <span>76 min</span> </div> <div class="metadata-item"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3z"></path> <path d="M19 10v2a7 7 0 0 1-14 0v-2"></path> <line x1="12" y1="19" x2="12" y2="22"></line> </svg> <span>EN</span> </div> </div> <p class="card-description">Venturing into cutting-edge astrophysics, this documentary examines the latest theories of multiverse existence and quantum mechanics that challenge our understanding of reality.</p> <div class="card-progress"> <div class="progress-bar" style="width: 78%"></div> </div> <div class="card-actions"> <button class="watch-btn"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polygon points="5 3 19 12 5 21 5 3"></polygon> </svg> Continue </button> <button class="bookmark-btn"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z"></path> </svg> </button> </div> </div> </div> <!-- Card 4 --> <div class="documentary-card theme-culture" data-category="culture"> <div class="card-image" style="background-image: url('https://images.unsplash.com/photo-1518998053901-5348d3961a04?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=600&q=80')"> <div class="card-category category-culture">Culture</div> </div> <div class="card-content"> <h3 class="card-title">Underground Sound</h3> <div class="card-metadata"> <div class="metadata-item"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <circle cx="12" cy="12" r="10"></circle> <polyline points="12 6 12 12 16 14"></polyline> </svg> <span>84 min</span> </div> <div class="metadata-item"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3z"></path> <path d="M19 10v2a7 7 0 0 1-14 0v-2"></path> <line x1="12" y1="19" x2="12" y2="22"></line> </svg> <span>EN</span> </div> </div> <p class="card-description">Following musical innovators operating outside mainstream channels, this documentary reveals how independent artists are reshaping cultural landscapes across five continents.</p> <div class="card-progress"> <div class="progress-bar" style="width: 0%"></div> </div> <div class="card-actions"> <button class="watch-btn"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polygon points="5 3 19 12 5 21 5 3"></polygon> </svg> Watch </button> <button class="bookmark-btn"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z"></path> </svg> </button> </div> </div> </div> </div> <div class="detail-view"> <div class="detail-content"> <button class="close-detail"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <line x1="18" y1="6" x2="6" y2="18"></line> <line x1="6" y1="6" x2="18" y2="18"></line> </svg> </button> <div class="detail-header"> <img class="detail-image" src="https://images.unsplash.com/photo-1518709766631-a6a7f45921c3?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=600&q=80" alt="Documentary cover"> <div class="detail-overlay"></div> </div> <div class="detail-info"> <h2 class="detail-title">The Last Wilderness</h2> <div class="detail-meta"> <span class="detail-category category-nature">Nature</span> <div class="detail-meta-item"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <circle cx="12" cy="12" r="10"></circle> <polyline points="12 6 12 12 16 14"></polyline> </svg> <span>68 minutes</span> </div> <div class="detail-meta-item"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <rect x="2" y="7" width="20" height="15" rx="2" ry="2"></rect> <polyline points="17 2 12 7 7 2"></polyline> </svg> <span>2023</span> </div> <div class="detail-meta-item"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path> </svg> <span>94% match</span> </div> </div> <p class="detail-description">A haunting exploration of Earth's last truly wild places and the species fighting for survival in increasingly fragmented habitats. 'The Last Wilderness' takes viewers to remote corners of our planet, from the depths of the Amazon rainforest to the Arctic tundra, documenting both the breathtaking beauty of these untamed environments and the existential threats they face.</p> <p class="detail-description">Featuring unprecedented footage of rare wildlife behavior and interviews with indigenous guardians and conservation scientists, this documentary presents an urgent call to preserve the planet's remaining wilderness before it's lost forever.</p> <div class="detail-tags"> <span class="tag">Conservation</span> <span class="tag">Wildlife</span> <span class="tag">Ecosystems</span> <span class="tag">Biodiversity</span> <span class="tag">Climate change</span> </div> <div class="detail-actions"> <button class="detail-watch-btn"> <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" view
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Animated Film Showcase</title> <style> :root { --primary: #ff7b25; --secondary: #4a86e8; --accent: #ff4081; --light: #f9f4e8; --dark: #333333; --tertiary: #4cd964; --quaternary: #9c27b0; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; } body { background-color: var(--light); overflow-x: hidden; padding: 20px; max-width: 700px; margin: 0 auto; height: 100vh; } .container { max-width: 100%; margin: 0 auto; overflow-y: auto; overflow-x: hidden; height: calc(100vh - 40px); scrollbar-width: thin; scrollbar-color: var(--primary) var(--light); max-height: 700px; } .container::-webkit-scrollbar { width: 8px; } .container::-webkit-scrollbar-track { background: var(--light); border-radius: 10px; } .container::-webkit-scrollbar-thumb { background-color: var(--primary); border-radius: 10px; } .header { text-align: center; margin-bottom: 30px; position: relative; } .header h1 { font-size: 2.5rem; color: var(--dark); position: relative; display: inline-block; margin-bottom: 10px; } .header h1::after { content: ''; position: absolute; bottom: -10px; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent), var(--tertiary), var(--quaternary)); border-radius: 10px; } .header p { color: var(--dark); font-size: 1.1rem; max-width: 600px; margin: 20px auto 0; } .filter-controls { display: flex; justify-content: center; margin-bottom: 30px; flex-wrap: wrap; gap: 10px; } .filter-btn { background-color: var(--light); border: 2px solid var(--primary); border-radius: 30px; padding: 8px 18px; font-size: 0.9rem; font-weight: 600; color: var(--primary); cursor: pointer; transition: all 0.3s ease; outline: none; } .filter-btn:hover { background-color: var(--primary); color: white; transform: translateY(-3px); box-shadow: 0 5px 15px rgba(255, 123, 37, 0.3); } .filter-btn.active { background-color: var(--primary); color: white; } .cards-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; max-width: 660px; margin: 0 auto; } .card { background-color: white; border-radius: 20px; overflow: hidden; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); position: relative; cursor: pointer; } .card:hover { transform: translateY(-15px) scale(1.03); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2); } .card-image { height: 200px; overflow: hidden; position: relative; } .card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; } .card:hover .card-image img { transform: scale(1.1); } .card-image::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 40%; background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent); } .card-content { padding: 20px; position: relative; } .card-tag { position: absolute; top: -15px; right: 20px; background-color: var(--accent); color: white; padding: 5px 15px; border-radius: 20px; font-size: 0.8rem; font-weight: bold; box-shadow: 0 5px 10px rgba(255, 64, 129, 0.3); z-index: 1; } .card-title { font-size: 1.5rem; color: var(--dark); margin-bottom: 10px; position: relative; display: inline-block; } .card-title::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 50px; height: 3px; background-color: var(--secondary); border-radius: 3px; transition: width 0.3s ease; } .card:hover .card-title::after { width: 100%; } .card-info { display: flex; justify-content: space-between; margin: 15px 0; color: #666; font-size: 0.9rem; } .card-desc { color: #666; font-size: 0.95rem; line-height: 1.5; margin-bottom: 15px; } .card-actions { display: flex; justify-content: space-between; align-items: center; } .watch-btn { padding: 8px 20px; background-color: var(--secondary); color: white; border: none; border-radius: 30px; font-weight: bold; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 5px 15px rgba(74, 134, 232, 0.3); } .watch-btn:hover { background-color: #3b78e7; transform: translateY(-3px); box-shadow: 0 8px 20px rgba(74, 134, 232, 0.4); } .card-rating { display: flex; align-items: center; gap: 5px; } .rating-stars { color: #ffc107; font-size: 1.2rem; } .detail-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.8); display: flex; justify-content: center; align-items: center; z-index: 1000; opacity: 0; visibility: hidden; transition: all 0.4s ease; } .detail-modal.active { opacity: 1; visibility: visible; } .modal-content { background-color: white; border-radius: 20px; overflow: hidden; max-width: 600px; width: 90%; max-height: 90vh; overflow-y: auto; transform: translateY(-50px); transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55); position: relative; } .detail-modal.active .modal-content { transform: translateY(0); } .modal-close { position: absolute; top: 15px; right: 15px; background: rgba(255, 255, 255, 0.8); width: 40px; height: 40px; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; z-index: 10; border: none; font-size: 1.2rem; color: var(--dark); transition: all 0.3s ease; } .modal-close:hover { background-color: var(--accent); color: white; } .modal-image { height: 300px; overflow: hidden; position: relative; } .modal-image img { width: 100%; height: 100%; object-fit: cover; } .modal-image::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 50%; background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent); } .modal-details { padding: 30px; } .modal-title { font-size: 2rem; color: var(--dark); margin-bottom: 10px; } .modal-info { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 20px; } .modal-info-item { display: flex; align-items: center; gap: 5px; color: #666; font-size: 0.9rem; } .modal-desc { color: #444; line-height: 1.6; margin-bottom: 20px; } .modal-characters { margin-bottom: 20px; } .modal-section-title { font-size: 1.3rem; color: var(--dark); margin-bottom: 15px; position: relative; display: inline-block; } .modal-section-title::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 40px; height: 3px; background-color: var(--secondary); border-radius: 3px; transition: width 0.3s ease; } .characters-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 15px; } .character-item { text-align: center; } .character-image { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; margin: 0 auto 8px; border: 3px solid var(--primary); } .character-image img { width: 100%; height: 100%; object-fit: cover; } .character-name { font-size: 0.9rem; color: var(--dark); font-weight: 600; } .modal-cta { display: flex; gap: 15px; margin-top: 20px; } .modal-btn { padding: 12px 25px; border-radius: 30px; font-weight: bold; cursor: pointer; transition: all 0.3s ease; flex: 1; border: none; } .modal-btn.primary { background-color: var(--secondary); color: white; box-shadow: 0 5px 15px rgba(74, 134, 232, 0.3); } .modal-btn.primary:hover { background-color: #3b78e7; transform: translateY(-3px); box-shadow: 0 8px 20px rgba(74, 134, 232, 0.4); } .modal-btn.secondary { background-color: white; color: var(--dark); border: 2px solid var(--dark); } .modal-btn.secondary:hover { background-color: var(--dark); color: white; transform: translateY(-3px); } .no-results { text-align: center; padding: 50px 0; color: var(--dark); font-size: 1.2rem; opacity: 0; height: 0; overflow: hidden; transition: opacity 0.3s ease; } .no-results.show { opacity: 1; height: auto; } .character-bubble { position: absolute; top: -50px; right: 20px; width: 100px; height: 100px; background-color: var(--quaternary); border-radius: 50%; display: flex; justify-content: center; align-items: center; animation: float 4s ease-in-out infinite; z-index: 5; opacity: 0.9; transform-origin: center bottom; } .character-bubble img { width: 80%; height: 80%; object-fit: contain; } @keyframes float { 0% { transform: translateY(0) rotate(0deg); } 25% { transform: translateY(-10px) rotate(5deg); } 50% { transform: translateY(0) rotate(0deg); } 75% { transform: translateY(-10px) rotate(-5deg); } 100% { transform: translateY(0) rotate(0deg); } } .wiggle-animation { animation: wiggle 0.4s ease-in-out; } @keyframes wiggle { 0% { transform: rotate(0deg); } 25% { transform: rotate(-5deg); } 50% { transform: rotate(0deg); } 75% { transform: rotate(5deg); } 100% { transform: rotate(0deg); } } @media (max-width: 600px) { .header h1 { font-size: 1.8rem; } .header p { font-size: 0.95rem; } .cards-container { grid-template-columns: 1fr; } .characters-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); } .modal-details { padding: 20px; } .modal-title { font-size: 1.6rem; } .character-image { width: 60px; height: 60px; } .filter-controls { gap: 8px; } .filter-btn { padding: 6px 14px; font-size: 0.8rem; } .character-bubble { width: 80px; height: 80px; top: -40px; } } /* Confetti effect */ .confetti { position: absolute; z-index: -1; opacity: 0; transition: opacity 0.3s ease; } .confetti.active { opacity: 1; } .confetti div { position: absolute; width: 10px; height: 10px; border-radius: 50%; animation: confetti-fall linear forwards; } @keyframes confetti-fall { 0% { transform: translateY(-100px) rotate(0deg); opacity: 1; } 100% { transform: translateY(500px) rotate(360deg); opacity: 0; } } </style> </head> <body> <div class="container"> <div class="character-bubble"> <img src="https://i.ibb.co/93mVj5V/genie.png" alt="Animated character"> </div> <div class="header"> <h1>Animated Wonders</h1> <p>Discover the magic of animation through our curated collection of iconic films that shaped generations. Hover over cards for a magical surprise!</p> </div> <div class="filter-controls"> <button class="filter-btn active" data-filter="all">All Films</button> <button class="filter-btn" data-filter="pixar">Pixar</button> <button class="filter-btn" data-filter="disney">Disney</button> <button class="filter-btn" data-filter="dreamworks">DreamWorks</button> <button class="filter-btn" data-filter="ghibli">Studio Ghibli</button> </div> <div class="cards-container"> <!-- Cards will be dynamically generated --> </div> <div class="no-results"> No films match your filter criteria. Try another category! </div> </div> <div class="detail-modal"> <div class="modal-content"> <button class="modal-close">✕</button> <div class="modal-image"> <img src="" alt="Film poster"> </div> <div class="modal-details"> <h2 class="modal-title"></h2> <div class="modal-info"> <!-- Info will be added dynamically --> </div> <p class="modal-desc"></p> <div class="modal-characters"> <h3 class="modal-section-title">Key Characters</h3> <div class="characters-grid"> <!-- Characters will be added dynamically --> </div> </div> <div class="modal-cta"> <button class="modal-btn primary">Watch Trailer</button> <button class="modal-btn secondary">Add to Favorites</button> </div> </div> </div> </div> <div class="confetti"></div> <script> // Film data const films = [ { id: 1, title: "Toy Story", studio: "pixar", year: 1995, director: "John Lasseter", duration: "1h 21m", rating: 4.8, tag: "Classic", description: "Toys come to life when humans aren't around! Woody, a pull-string cowboy doll, is Andy's favorite toy until space ranger Buzz Lightyear arrives. Their rivalry evolves into friendship as they get lost and must escape a neighbor's house.", image: "https://i.ibb.co/PzVJ9Jn/toy-story.jpg", characters: [ {name: "Woody", image: "https://i.ibb.co/wK1MjvN/woody.jpg"}, {name: "Buzz Lightyear", image: "https://i.ibb.co/kMzNLZC/buzz.jpg"}, {name: "Rex", image: "https://i.ibb.co/g9r9mR7/rex.jpg"}, {name: "Mr. Potato Head", image: "https://i.ibb.co/GMBgpZr/potato.jpg"} ] }, { id: 2, title: "Finding Nemo", studio: "pixar", year: 2003, director: "Andrew Stanton", duration: "1h 40m", rating: 4.7, tag: "Adventure", description: "After his son Nemo is captured in the Great Barrier Reef and taken to Sydney, timid clownfish Marlin sets out on a journey across the ocean. He's joined by forgetful but friendly Dory, encountering various dangers along the way.", image: "https://i.ibb.co/6J8QVnc/finding-nemo.jpg", characters: [ {name: "Marlin", image: "https://i.ibb.co/Db7TJXM/marlin.jpg"}, {name: "Dory", image: "https://i.ibb.co/Rhhwc7m/dory.jpg"}, {name: "Nemo", image: "https://i.ibb.co/wR34TPz/nemo.jpg"}, {name: "Crush", image: "https://i.ibb.co/HnS5ZLY/crush.jpg"} ] }, { id: 3, title: "The Lion King", studio: "disney", year: 1994, director: "Roger Allers, Rob Minkoff", duration: "1h 28m", rating: 4.9, tag: "Masterpiece", description: "Young lion prince Simba flees his kingdom after being blamed for his father's murder. Years later, a chance encounter with his childhood friend leads him to confront his uncle and reclaim his identity as the rightful king.", image: "https://i.ibb.co/kJWjRCr/lion-king.jpg", characters: [ {name: "Simba", image: "https://i.ibb.co/TY7kyWs/simba.jpg"}, {name: "Mufasa", image: "https://i.ibb.co/NsBZC20/mufasa.jpg"}, {name: "Timon", image: "https://i.ibb.co/ysF2zLs/timon.jpg"}, {name: "Pumbaa", image: "https://i.ibb.co/P9Gbz9k/pumbaa.jpg"} ] }, { id: 4, title: "Spirited Away", studio: "ghibli", year: 2001, director: "Hayao Miyazaki", duration: "2h 5m", rating: 4.9, tag: "Magical", description: "During her family's move, 10-year-old Chihiro wanders into a world ruled by gods, witches, and spirits where humans are transformed into beasts. She must summon the courage to survive and find a way to free her parents and return home.", image: "https://i.ibb.co/mRYrYZc/spirited-away.jpg", characters: [ {name: "Chihiro", image: "https://i.ibb.co/XxsxBVT/chihiro.jpg"}, {name: "Haku", image: "https://i.ibb.co/JHLFjzP/haku.jpg"}, {name: "No-Face", image: "https://i.ibb.co/CnL7hRQ/no-face.jpg"}, {name: "Yubaba", image: "https://i.ibb.co/XDT6Fw1/yubaba.jpg"} ] }, { id: 5, title: "Shrek", studio: "dreamworks", year: 2001, director: "Andrew Adamson, Vicky Jenson", duration: "1h 30m", rating: 4.6, tag: "Hilarious", description: "An ogre named Shrek finds his swamp overrun by fairy tale creatures banished by Lord Farquaad. To reclaim his home, Shrek makes a deal to rescue Princess Fiona from a dragon-guarded castle, leading to an unexpected romance.", image: "https://i.ibb.co/JmGkXG4/shrek.jpg", characters: [ {name: "Shrek", image: "https://i.ibb.co/hDV5C7h/shrek-char.jpg"}, {name: "Donkey", image: "https://i.ibb.co/C9dFQPQ/donkey.jpg"}, {name: "Fiona", image: "https://i.ibb.co/jvC9MBt/fiona.jpg"}, {name: "Lord Farquaad", image: "https://i.ibb.co/LppnxJ1/farquaad.jpg"} ] }, { id: 6, title: "Frozen", studio: "disney", year: 2013, director: "Chris Buck, Jennifer Lee", duration: "1h 42m", rating: 4.5, tag: "Musical", description: "Fearless optimist Anna teams up with rugged mountain man Kristoff to find her sister Elsa, whose icy powers have trapped the kingdom of Arendelle in eternal winter. Along the way, they encounter magical trolls, a snowman named Olaf, and more.", image: "https://i.ibb.co/88mtCSm/frozen.jpg", characters: [ {name: "Elsa", image: "https://i.ibb.co/d6ZhXTG/elsa.jpg"}, {name: "Anna", image: "https://i.ibb.co/YbTH5nw/anna.jpg"}, {name: "Olaf", image: "https://i.ibb.co/1d0J4kF/olaf.jpg"}, {name: "Kristoff", image: "https://i.ibb.co/NFfPnzn/kristoff.jpg"} ] }, { id: 7, title: "My Neighbor Totoro", studio: "ghibli", year: 1988, director: "Hayao Miyazaki", duration: "1h 26m", rating: 4.8, tag: "Heartwarming", description: "Two young sisters move with their father to the countryside to be closer to their hospitalized mother. They discover the surrounding forest is home to magical creatures, including the mysterious Totoro, who becomes their friend and protector.", image: "https://i.ibb.co/c1z6qJb/totoro.jpg", characters: [ {name: "Totoro", image: "https://i.ibb.co/0fnqtBz/totoro-char.jpg"}, {name: "Mei", image: "https://i.ibb.co/CBXq4zz/mei.jpg"}, {name: "Satsuki", image: "https://i.ibb.co/bKKnCTz/satsuki.jpg"}, {name: "Catbus", image: "https://i.ibb.co/rMJZZj7/catbus.jpg"} ] }, { id: 8, title: "How to Train Your Dragon", studio: "dreamworks", year: 2010, director: "Chris Sanders, Dean DeBlois", duration: "1h 38m", rating: 4.7, tag: "Epic", description: "Hiccup, a Viking teenager, defies tradition by befriending his deadliest foe — a ferocious dragon he calls Toothless. Together, they fight against the odds to save both their worlds in this heartwarming tale of friendship and courage.", image: "https://i.ibb.co/tMMdB4M/dragon.jpg", characters: [ {name: "Hiccup", image: "https://i.ibb.co/BGt3qjG/hiccup.jpg"}, {name: "Toothless", image: "https://i.ibb.co/4f2b24V/toothless.jpg"}, {name: "Astrid", image: "https://i.ibb.co/8XWG5pq/astrid.jpg"}, {name: "Stoick", image: "https://i.ibb.co/4Mf6B4h/stoick.jpg"} ] } ]; // DOM elements const cardsContainer = document.querySelector('.cards-container'); const filterBtns = document.querySelectorAll('.filter-btn'); const detailModal = document.querySelector('.detail-modal'); const modalContent = document.querySelector('.modal-content'); const modalClose = document.querySelector('.modal-close'); const modalImage = document.querySelector('.modal-image img'); const modalTitle = document.querySelector('.modal-title'); const modalInfo = document.querySelector('.modal-info'); const modalDesc = document.querySelector('.modal-desc'); const charactersGrid = document.querySelector('.characters-grid'); const confettiContainer = document.querySelector('.confetti'); const noResults = document.querySelector('.no-results'); // Generate cards function generateCards(filmsArray) { cardsContainer.innerHTML = ''; if (filmsArray.length === 0) { noResults.classList.add('show'); return; } noResults.classList.remove('show'); filmsArray.forEach(film => { const card = document.createElement('div'); card.classList.add('card'); card.setAttribute('data-id', film.id); card.innerHTML = ` <div class="card-image"> <img src="${film.image}" alt="${film.title}"> </div> <div class="card-content"> <div class="card-tag">${film.tag}</div> <h3 class="card-title">${film.title}</h3> <div class="card-info"> <span>${film.year}</span> <span>${film.duration}</span> </div> <p class="card-desc">${film.description.substring(0, 100)}...</p> <div class="card-actions"> <button class="watch-btn">Details</button> <div class="card-rating"> <div class="rating-stars">★★★★★</div> <span>${film.rating}</span> </div> </div> </div> `; cardsContainer.appendChild(card); // Add wiggle animation on hover card.addEventListener('mouseenter', () => { card.classList.add('wiggle-animation'); setTimeout(() => { card.classList.remove('wiggle-animation'); }, 400); }); // Open modal on card click card.addEventListener('click', () => { openModal(film); }); }); } // Initialize cards generateCards(films); // Filter functionality filterBtns.forEach(btn => { btn.addEventListener('click', () => { const filter = btn.getAttribute('data-filter'); // Update active button filterBtns.forEach(b => b.classList.remove('active')); btn.classList.add('active'); // Filter cards if (filter === 'all') { generateCards(films); } else { const filteredFilms = films.filter(film => film.studio === filter); generateCards(filteredFilms); } // Add confetti effect createConfetti(); }); }); // Open modal with film details function openModal(film) { // Set modal content modalImage.src = film.image; modalTitle.textContent = film.title; // Set info section modalInfo.innerHTML = ` <div class="modal-info-item"> <span>Studio: ${capitalizeFirstLetter(film.studio)}</span> </div> <div class="modal-info-item"> <span>Year: ${film.year}</span> </div> <div class="modal-info-item"> <span>Director: ${film.director}</span> </div> <div class="modal-info-item"> <span>Duration: ${film.duration}</span> </div> <div class="modal-info-item"> <span>Rating: ${film.rating}/5.0</span> </div> `; // Set description modalDesc.textContent = film.description; // Set characters charactersGrid.innerHTML = ''; film.characters.forEach(character => { const characterEl = document.createElement('div'); characterEl.classList.add('character-item'); characterEl.innerHTML = ` <div class="character-image"> <img src="${character.image}" alt="${character.name}"> </div> <div class="character-name">${character.name}</div> `; charactersGrid.appendChild(characterEl); }); // Show modal with animation detailModal.classList.add('active'); document.body.style.overflow = 'hidden'; } // Close modal modalClose.addEventListener('click', () => { detailModal.classList.remove('active'); document.body.style.overflow = 'auto'; }); // Close modal when clicking outside content detailModal.addEventListener('click', (e) => { if (e.target === detailModal) { detailModal.classList.remove('active'); document.body.style.overflow = 'auto'; } }); // Create confetti effect function createConfetti() { confettiContainer.innerHTML = ''; confettiContainer.classList.remove('active'); setTimeout(() => { confettiContainer.classList.add('active'); const colors = ['#ff7b25', '#4a86e8', '#ff4081', '#4cd964', '#9c27b0']; for (let i = 0; i < 50; i++) { const confetti = document.createElement('div'); const color = colors[Math.floor(Math.random() * colors.length)]; confetti.style.left = Math.random() * 100 + '%'; confetti.style.backgroundColor = color; confetti.style.animationDuration = (Math.random() * 3 + 2) + 's'; confettiContainer.appendChild(confetti); } setTimeout(() => { confettiContainer.classList.remove('active'); }, 3000); }, 100); } // Utility function to capitalize first letter function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); } </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Cinebase: Movie Database Cards</title> <style> :root { --primary-color: #4a1e9e; --secondary-color: #ff7b54; --light-color: #f8f9fa; --dark-color: #1a1a2e; --gray-color: #6c757d; --card-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); --transition-speed: 0.4s; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body { background-color: #f0f2f5; background-image: radial-gradient(circle at 10% 20%, rgba(74, 30, 158, 0.03) 0%, rgba(74, 30, 158, 0) 20%), radial-gradient(circle at 90% 80%, rgba(255, 123, 84, 0.03) 0%, rgba(255, 123, 84, 0) 20%); display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; overflow-x: hidden; } .container { width: 100%; max-width: 700px; padding: 0 15px; } .header { margin-bottom: 25px; text-align: center; } .header h1 { color: var(--dark-color); font-size: 2.4rem; margin-bottom: 10px; position: relative; display: inline-block; } .header h1::after { content: ''; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%); width: 60%; height: 3px; background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)); border-radius: 3px; } .search-bar { display: flex; margin-bottom: 30px; overflow: hidden; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); transition: box-shadow var(--transition-speed); } .search-bar:focus-within { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12); } .search-bar input { flex: 1; padding: 14px 20px; border: none; outline: none; font-size: 1rem; background-color: white; } .search-bar button { background-color: var(--primary-color); border: none; padding: 0 20px; color: white; cursor: pointer; transition: background-color var(--transition-speed); } .search-bar button:hover { background-color: #5c2ec0; } .tags { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 25px; } .tag { padding: 6px 14px; border-radius: 20px; background-color: white; border: 1px solid rgba(0, 0, 0, 0.05); color: var(--gray-color); font-size: 0.85rem; cursor: pointer; transition: all var(--transition-speed); } .tag:hover, .tag.active { background-color: var(--primary-color); color: white; transform: translateY(-2px); } .movie-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; } .movie-card { background-color: white; border-radius: 10px; overflow: hidden; position: relative; height: 300px; perspective: 1000px; cursor: pointer; box-shadow: var(--card-shadow); transition: transform 0.5s, box-shadow var(--transition-speed); } .movie-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15); } .movie-card-inner { position: relative; width: 100%; height: 100%; text-align: center; transition: transform 0.8s; transform-style: preserve-3d; } .movie-card:hover .movie-card-inner { transform: rotateY(180deg); } .movie-card-front, .movie-card-back { position: absolute; width: 100%; height: 100%; -webkit-backface-visibility: hidden; backface-visibility: hidden; display: flex; flex-direction: column; } .movie-card-back { transform: rotateY(180deg); background-color: white; padding: 15px; display: flex; flex-direction: column; justify-content: space-between; } .movie-poster { width: 100%; height: 70%; object-fit: cover; transition: transform var(--transition-speed); } .movie-info { padding: 12px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; } .movie-title { font-weight: 600; margin-bottom: 5px; color: var(--dark-color); font-size: 0.95rem; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; } .movie-year { color: var(--gray-color); font-size: 0.85rem; } .movie-rating { display: flex; align-items: center; justify-content: center; font-size: 0.9rem; color: var(--gray-color); } .star-rating { display: flex; margin-right: 5px; } .star { color: #ddd; font-size: 1rem; margin-right: 2px; transition: color 0.3s; } .star.filled { color: #ffd700; } /* Back side elements */ .back-title { color: var(--primary-color); font-weight: bold; margin-bottom: 5px; font-size: 1.1rem; } .back-details { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--gray-color); margin-bottom: 10px; } .back-description { font-size: 0.85rem; overflow: hidden; flex: 1; line-height: 1.4; color: var(--dark-color); margin-bottom: 15px; } .back-genres { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 15px; } .genre-tag { background-color: rgba(74, 30, 158, 0.1); color: var(--primary-color); padding: 3px 8px; border-radius: 4px; font-size: 0.7rem; } .watch-btn { background-color: var(--secondary-color); color: white; border: none; border-radius: 6px; padding: 8px 15px; font-weight: 600; cursor: pointer; transition: transform var(--transition-speed), background-color var(--transition-speed); } .watch-btn:hover { transform: translateY(-2px); background-color: #ff9476; } .load-more { display: block; margin: 30px auto; padding: 12px 25px; background-color: transparent; border: 2px solid var(--primary-color); color: var(--primary-color); border-radius: 8px; font-weight: 600; cursor: pointer; transition: all var(--transition-speed); } .load-more:hover { background-color: var(--primary-color); color: white; } .rating-animation { animation: fillStar 1s ease forwards; } @keyframes fillStar { 0% { color: #ddd; } 100% { color: #ffd700; } } @media (max-width: 576px) { .movie-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; } .movie-card { height: 250px; } .header h1 { font-size: 1.8rem; } } /* Pulse animation for active filters */ .tag.active { animation: pulse 2s infinite; } @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74, 30, 158, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(74, 30, 158, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 30, 158, 0); } } /* Loading skeleton */ .skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: loading 1.5s infinite; } @keyframes loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } } </style> </head> <body> <div class="container"> <div class="header"> <h1>Cinebase</h1> <p>Discover your next favorite film</p> </div> <div class="search-bar"> <input type="text" placeholder="Search for movies, actors, directors..." id="search-input"> <button id="search-btn"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <circle cx="11" cy="11" r="8"></circle> <line x1="21" y1="21" x2="16.65" y2="16.65"></line> </svg> </button> </div> <div class="tags"> <div class="tag active">All</div> <div class="tag">Action</div> <div class="tag">Drama</div> <div class="tag">Sci-fi</div> <div class="tag">Comedy</div> <div class="tag">Thriller</div> </div> <div class="movie-grid" id="movie-grid"> <!-- Movies will be inserted here by JavaScript --> </div> <button class="load-more" id="load-more">Load More Films</button> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Sample movie data const movies = [ { id: 1, title: "Inception", year: 2010, rating: 4.8, poster: "https://images.unsplash.com/photo-1485846234645-a62644f84728?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80", director: "Christopher Nolan", runtime: "148 min", description: "A thief who steals corporate secrets through the use of dream-sharing technology is given the inverse task of planting an idea into the mind of a C.E.O.", genres: ["Sci-fi", "Action", "Thriller"] }, { id: 2, title: "Parasite", year: 2019, rating: 4.6, poster: "https://images.unsplash.com/photo-1536440136628-849c177e76a1?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80", director: "Bong Joon-ho", runtime: "132 min", description: "Greed and class discrimination threaten the newly formed symbiotic relationship between the wealthy Park family and the destitute Kim clan.", genres: ["Drama", "Thriller", "Comedy"] }, { id: 3, title: "The Grand Budapest Hotel", year: 2014, rating: 4.2, poster: "https://images.unsplash.com/photo-1594909122845-11baa439b7bf?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80", director: "Wes Anderson", runtime: "99 min", description: "A concierge works at a famous European hotel between the wars and becomes the center of a farcical whirlwind of suspicion when his elderly lover turns up dead.", genres: ["Comedy", "Drama"] }, { id: 4, title: "Interstellar", year: 2014, rating: 4.7, poster: "https://images.unsplash.com/photo-1539721972319-f0e80a00d424?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80", director: "Christopher Nolan", runtime: "169 min", description: "A team of explorers travel through a wormhole in space in an attempt to ensure humanity's survival.", genres: ["Sci-fi", "Drama", "Adventure"] }, { id: 5, title: "Whiplash", year: 2014, rating: 4.5, poster: "https://images.unsplash.com/photo-1514525253161-7a46d19cd819?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80", director: "Damien Chazelle", runtime: "106 min", description: "A promising young drummer enrolls at a cut-throat music conservatory where his dreams of greatness are mentored by an instructor who will stop at nothing to realize a student's potential.", genres: ["Drama", "Music"] }, { id: 6, title: "The Dark Knight", year: 2008, rating: 4.9, poster: "https://images.unsplash.com/photo-1497124401559-3e75ec2ed794?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80", director: "Christopher Nolan", runtime: "152 min", description: "When the menace known as the Joker wreaks havoc and chaos on the people of Gotham, Batman must accept one of the greatest psychological and physical tests of his ability to fight injustice.", genres: ["Action", "Crime", "Drama"] } ]; const movieGrid = document.getElementById('movie-grid'); const searchInput = document.getElementById('search-input'); const searchBtn = document.getElementById('search-btn'); const loadMoreBtn = document.getElementById('load-more'); const tags = document.querySelectorAll('.tag'); // Initially render all movies renderMovies(movies); // Render a set of movies function renderMovies(moviesArray) { movieGrid.innerHTML = ''; if (moviesArray.length === 0) { movieGrid.innerHTML = '<p style="grid-column: 1/-1; text-align: center; color: var(--gray-color);">No movies found matching your criteria. Try a different search term or category.</p>'; return; } moviesArray.forEach(movie => { const movieCard = document.createElement('div'); movieCard.className = 'movie-card'; movieCard.innerHTML = ` <div class="movie-card-inner"> <div class="movie-card-front"> <img src="${movie.poster}" alt="${movie.title}" class="movie-poster"> <div class="movie-info"> <div> <h3 class="movie-title">${movie.title}</h3> <p class="movie-year">${movie.year}</p> </div> <div class="movie-rating"> <div class="star-rating" data-rating="${movie.rating}"> <span class="star">★</span> <span class="star">★</span> <span class="star">★</span> <span class="star">★</span> <span class="star">★</span> </div> <span>${movie.rating.toFixed(1)}</span> </div> </div> </div> <div class="movie-card-back"> <h3 class="back-title">${movie.title}</h3> <div class="back-details"> <span>${movie.year}</span> <span>${movie.runtime}</span> <span>Dir: ${movie.director}</span> </div> <p class="back-description">${movie.description}</p> <div class="back-genres"> ${movie.genres.map(genre => `<span class="genre-tag">${genre}</span>`).join('')} </div> <button class="watch-btn">Watch Now</button> </div> </div> `; movieGrid.appendChild(movieCard); // Animate the star ratings setTimeout(() => { const starRating = movieCard.querySelector('.star-rating'); const stars = starRating.querySelectorAll('.star'); const rating = parseFloat(starRating.dataset.rating); stars.forEach((star, index) => { if (index < Math.floor(rating)) { star.classList.add('filled'); } else if (index < rating) { // Handle partial star (e.g. 4.5) star.innerHTML = '★'; star.style.background = `linear-gradient(90deg, #ffd700 ${(rating - Math.floor(rating)) * 100}%, #ddd 0%)`; star.style.webkitBackgroundClip = 'text'; star.style.webkitTextFillColor = 'transparent'; } }); }, 300); }); } // Search functionality searchBtn.addEventListener('click', handleSearch); searchInput.addEventListener('keyup', (e) => { if (e.key === 'Enter') { handleSearch(); } }); function handleSearch() { const searchTerm = searchInput.value.toLowerCase().trim(); if (searchTerm === '') { renderMovies(movies); return; } const filteredMovies = movies.filter(movie => movie.title.toLowerCase().includes(searchTerm) || movie.director.toLowerCase().includes(searchTerm) || movie.genres.some(genre => genre.toLowerCase().includes(searchTerm)) ); renderMovies(filteredMovies); // Reset active tag to "All" tags.forEach(tag => { tag.classList.remove('active'); if (tag.textContent === 'All') { tag.classList.add('active'); } }); } // Tag filtering tags.forEach(tag => { tag.addEventListener('click', () => { // Remove active class from all tags tags.forEach(t => t.classList.remove('active')); // Add active class to clicked tag tag.classList.add('active'); const selectedGenre = tag.textContent; if (selectedGenre === 'All') { renderMovies(movies); } else { const filteredMovies = movies.filter(movie => movie.genres.includes(selectedGenre) ); renderMovies(filteredMovies); } // Clear search input searchInput.value = ''; }); }); // Load more button (simulating loading more movies) loadMoreBtn.addEventListener('click', () => { // Show loading effect loadMoreBtn.textContent = 'Loading...'; loadMoreBtn.disabled = true; // Simulate loading delay setTimeout(() => { // Add more movies with skeleton loading for (let i = 0; i < 3; i++) { const skeletonCard = document.createElement('div'); skeletonCard.className = 'movie-card'; skeletonCard.innerHTML = ` <div class="movie-card-inner"> <div class="movie-card-front"> <div class="movie-poster skeleton" style="height: 70%;"></div> <div class="movie-info"> <div> <div class="movie-title skeleton" style="height: 18px; width: 80%; margin-bottom: 8px;"></div> <div class="movie-year skeleton" style="height: 14px; width: 40%;"></div> </div> <div class="movie-rating skeleton" style="height: 15px; width: 60%; margin-top: 10px;"></div> </div> </div> </div> `; movieGrid.appendChild(skeletonCard); } // After another delay, replace skeletons with new movies setTimeout(() => { const newMovies = [ { id: 7, title: "Dune", year: 2021, rating: 4.5, poster: "https://images.unsplash.com/photo-1596727147705-61a532a659bd?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80", director: "Denis Villeneuve", runtime: "155 min", description: "Feature adaptation of Frank Herbert's science fiction novel about the son of a noble family entrusted with the protection of the most valuable asset and element in the galaxy.", genres: ["Sci-fi", "Adventure", "Drama"] }, { id: 8, title: "The French Dispatch", year: 2021, rating: 3.9, poster: "https://images.unsplash.com/photo-1616530940355-351fabd9524b?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80", director: "Wes Anderson", runtime: "108 min", description: "A love letter to journalists set in an outpost of an American newspaper in a fictional 20th-century French city that brings to life a collection of stories.", genres: ["Comedy", "Drama", "Romance"] }, { id: 9, title: "No Time to Die", year: 2021, rating: 4.0, poster: "https://images.unsplash.com/photo-1536440136628-849c177e76a1?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80", director: "Cary Joji Fukunaga", runtime: "163 min", description: "James Bond has left active service. His peace is short-lived when Felix Leiter, an old friend from the CIA, turns up asking for help.", genres: ["Action", "Adventure", "Thriller"] } ]; // Remove skeleton cards const skeletonCards = document.querySelectorAll('.movie-card:nth-last-child(-n+3)'); skeletonCards.forEach(card => card.remove()); // Add new movies renderMovies([...movies, ...newMovies]); // Update button loadMoreBtn.textContent = 'All Movies Loaded'; loadMoreBtn.disabled = true; loadMoreBtn.style.opacity = '0.6'; }, 1500); }, 1000); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Cinematic Genius: Movie Trivia Cards</title> <style> :root { --primary: #ff3366; --secondary: #2e58ff; --tertiary: #33d6a6; --dark: #1a1a2e; --light: #f8f9fa; --gradient: linear-gradient(135deg, var(--primary), var(--secondary)); --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); --card-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.25); } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; } body { background-color: var(--dark); color: var(--light); display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 700px; overflow-x: hidden; padding: 20px; } .container { max-width: 650px; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; } .header { text-align: center; margin-bottom: 20px; position: relative; width: 100%; } h1 { font-size: 2.5rem; margin-bottom: 0.5rem; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; letter-spacing: -0.5px; } .subtitle { font-size: 1rem; opacity: 0.8; margin-bottom: 1rem; } .cards-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; width: 100%; max-height: 520px; overflow-y: auto; padding: 10px 5px; scrollbar-width: thin; scrollbar-color: var(--primary) var(--dark); } .cards-container::-webkit-scrollbar { width: 6px; } .cards-container::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.1); border-radius: 10px; } .cards-container::-webkit-scrollbar-thumb { background-color: var(--primary); border-radius: 10px; } .card { background: rgba(255, 255, 255, 0.05); border-radius: 16px; padding: 20px; position: relative; overflow: hidden; cursor: pointer; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: var(--card-shadow); min-height: 220px; transform-style: preserve-3d; perspective: 1000px; } .card:hover { transform: translateY(-5px); box-shadow: var(--card-shadow-hover); } .card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 5px; background: var(--gradient); } .card::after { content: '?'; position: absolute; bottom: 10px; right: 15px; font-size: 2.5rem; font-weight: bold; opacity: 0.2; } .card-front, .card-back { backface-visibility: hidden; transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); width: 100%; height: 100%; position: absolute; top: 0; left: 0; padding: 20px; display: flex; flex-direction: column; } .card-back { transform: rotateY(180deg); background: rgba(255, 255, 255, 0.1); border-radius: 16px; backdrop-filter: blur(5px); } .card.flipped .card-front { transform: rotateY(-180deg); } .card.flipped .card-back { transform: rotateY(0); } .difficulty { position: absolute; top: 15px; right: 15px; font-size: 0.8rem; padding: 3px 8px; border-radius: 20px; background: rgba(255, 255, 255, 0.1); } .easy { color: var(--tertiary); border: 1px solid var(--tertiary); } .medium { color: #ffcc00; border: 1px solid #ffcc00; } .hard { color: var(--primary); border: 1px solid var(--primary); } .category { text-transform: uppercase; font-size: 0.75rem; font-weight: 600; letter-spacing: 1px; margin-bottom: 10px; color: var(--primary); } .question { font-size: 1.1rem; font-weight: 600; margin-bottom: 15px; line-height: 1.4; } .options { display: flex; flex-direction: column; gap: 8px; margin-top: auto; } .option { padding: 8px 12px; border-radius: 8px; background: rgba(255, 255, 255, 0.07); transition: all 0.3s ease; font-size: 0.9rem; } .option:hover { background: rgba(255, 255, 255, 0.15); transform: translateX(5px); } .answer { font-size: 1.1rem; font-weight: 600; margin-bottom: 15px; color: var(--tertiary); } .trivia-title { font-size: 0.85rem; text-transform: uppercase; color: var(--secondary); font-weight: 600; margin-bottom: 5px; } .trivia-content { font-size: 0.95rem; line-height: 1.5; margin-bottom: 15px; } .back-button { cursor: pointer; padding: 8px 16px; background: rgba(255, 255, 255, 0.1); border: none; border-radius: 20px; color: var(--light); margin-top: auto; transition: all 0.3s ease; font-weight: 500; display: flex; align-items: center; justify-content: center; width: fit-content; } .back-button:hover { background: rgba(255, 255, 255, 0.2); } .back-button svg { margin-right: 5px; width: 16px; height: 16px; } .film-icon { position: absolute; opacity: 0.05; right: -20px; bottom: -20px; width: 100px; height: 100px; z-index: 0; } .confetti { position: absolute; width: 10px; height: 10px; background-color: var(--primary); border-radius: 0; animation: confetti-fall 3s ease-in-out forwards; z-index: 10; opacity: 0; } @keyframes confetti-fall { 0% { transform: translateY(0) rotate(0deg); opacity: 1; } 100% { transform: translateY(300px) rotate(720deg); opacity: 0; } } .card-counter { font-size: 0.8rem; opacity: 0.7; margin-top: 5px; } .progress-container { width: 100%; background: rgba(255, 255, 255, 0.1); height: 4px; border-radius: 2px; margin-top: 10px; margin-bottom: 15px; position: relative; overflow: hidden; } .progress-bar { height: 100%; background: var(--gradient); width: 0%; transition: width 0.4s ease; border-radius: 2px; } .stats { display: flex; gap: 15px; margin-top: auto; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.1); } .stat { display: flex; flex-direction: column; align-items: center; } .stat-value { font-size: 1.2rem; font-weight: bold; color: var(--primary); } .stat-label { font-size: 0.7rem; opacity: 0.7; text-transform: uppercase; } .filter-buttons { display: flex; gap: 10px; margin-bottom: 15px; flex-wrap: wrap; justify-content: center; } .filter-button { background: rgba(255, 255, 255, 0.1); border: none; color: var(--light); padding: 6px 12px; border-radius: 20px; cursor: pointer; transition: all 0.3s ease; font-size: 0.8rem; } .filter-button:hover { background: rgba(255, 255, 255, 0.2); } .filter-button.active { background: var(--primary); color: white; } @media (max-width: 600px) { h1 { font-size: 2rem; } .cards-container { grid-template-columns: 1fr; } .card { min-height: 200px; } } </style> </head> <body> <div class="container"> <div class="header"> <h1>Cinematic Genius</h1> <p class="subtitle">Test your movie knowledge with these trivia cards</p> <div class="progress-container"> <div class="progress-bar" id="progressBar"></div> </div> <div class="filter-buttons"> <button class="filter-button active" data-filter="all">All</button> <button class="filter-button" data-filter="classics">Classics</button> <button class="filter-button" data-filter="directors">Directors</button> <button class="filter-button" data-filter="oscars">Oscars</button> <button class="filter-button" data-filter="popculture">Pop Culture</button> </div> </div> <div class="cards-container" id="cardsContainer"></div> </div> <script> const triviaCards = [ { category: "classics", difficulty: "easy", question: "Which 1939 film features the line 'Frankly, my dear, I don't give a damn'?", options: ["Casablanca", "Gone with the Wind", "Citizen Kane", "The Wizard of Oz"], answer: "Gone with the Wind", trivia: "This famous line was nearly censored due to the strict Hays Code. The producers had to fight to keep it in, paying a $5,000 fine for its inclusion." }, { category: "directors", difficulty: "medium", question: "Which director is known as the 'Master of Suspense'?", options: ["Steven Spielberg", "Alfred Hitchcock", "Martin Scorsese", "Quentin Tarantino"], answer: "Alfred Hitchcock", trivia: "Hitchcock made cameo appearances in 39 of his 52 films. Early on, he would appear in crowds, but as he became more recognizable, he made his appearances earlier in the films so as not to distract viewers." }, { category: "oscars", difficulty: "hard", question: "Which film won Best Picture at the 2020 Academy Awards, making history as the first non-English language film to win?", options: ["The Shape of Water", "Parasite", "Roma", "Joker"], answer: "Parasite", trivia: "Parasite won a total of four Oscars that night: Best Picture, Best Director, Best Original Screenplay, and Best International Feature Film. Director Bong Joon-ho remarked that he would 'drink until the next morning'." }, { category: "popculture", difficulty: "medium", question: "What is the highest-grossing film of all time when adjusted for inflation?", options: ["Avatar", "Titanic", "Gone with the Wind", "Star Wars: The Force Awakens"], answer: "Gone with the Wind", trivia: "When adjusted for inflation, Gone with the Wind (1939) has earned approximately $3.8 billion globally. The film cost $3.9 million to produce, which was an enormous sum at the time." }, { category: "classics", difficulty: "medium", question: "In The Godfather, what type of animal head does Jack Woltz find in his bed?", options: ["Dog", "Pig", "Horse", "Cow"], answer: "Horse", trivia: "The horse head used in the infamous scene was real. The production got it from a dog food company that had slaughtered a horse (not for the movie). Animal rights activists were furious until learning the horse was already dead." }, { category: "directors", difficulty: "hard", question: "Which director is famous for his 'one-point perspective' shots?", options: ["Christopher Nolan", "Stanley Kubrick", "David Lynch", "Wes Anderson"], answer: "Stanley Kubrick", trivia: "Kubrick's one-point perspective creates a sense of symmetry and infinite depth. His perfectionism was legendary - for The Shining, he made Shelley Duvall repeat a scene 127 times, setting a record for most takes." }, { category: "oscars", difficulty: "easy", question: "Which actress has won the most Academy Awards?", options: ["Meryl Streep", "Katharine Hepburn", "Jennifer Lawrence", "Frances McDormand"], answer: "Katharine Hepburn", trivia: "Katharine Hepburn won 4 Best Actress Oscars over her career, for 'Morning Glory' (1933), 'Guess Who's Coming to Dinner' (1967), 'The Lion in Winter' (1968), and 'On Golden Pond' (1981)." }, { category: "popculture", difficulty: "easy", question: "What color pill does Neo take in 'The Matrix'?", options: ["Blue", "Green", "Red", "Yellow"], answer: "Red", trivia: "The 'red pill or blue pill' choice has become a major pop culture metaphor about choosing between truth (red) and blissful ignorance (blue). The scene has been referenced in countless other films, TV shows, and even political discourse." }, { category: "classics", difficulty: "hard", question: "In Citizen Kane, what does 'Rosebud' refer to?", options: ["His childhood sled", "His first love", "His pet dog", "His mother's nickname"], answer: "His childhood sled", trivia: "The sled was sold at auction in 1982 for $60,500. There were actually three sleds used in the film - one intact, one partially burnt, and one completely burnt. The one sold was the burnt version." }, { category: "directors", difficulty: "medium", question: "Which filmmaker pioneered the 'jump cut' technique?", options: ["Orson Welles", "Jean-Luc Godard", "Sergei Eisenstein", "Akira Kurosawa"], answer: "Jean-Luc Godard", trivia: "Godard popularized jump cuts in his 1960 film 'Breathless' (À bout de souffle). Originally, they were used because he needed to shorten the film and decided to remove sections from the middle of scenes rather than whole sequences." }, { category: "oscars", difficulty: "medium", question: "Which director holds the record for most Best Director Oscar nominations?", options: ["Steven Spielberg", "Martin Scorsese", "Woody Allen", "William Wyler"], answer: "William Wyler", trivia: "William Wyler received 12 nominations for Best Director and won three times for 'Mrs. Miniver', 'The Best Years of Our Lives', and 'Ben-Hur'. He directed more actors to Oscar-winning performances than any other director." }, { category: "popculture", difficulty: "hard", question: "In 'Fight Club', what is the first rule of Fight Club?", options: ["Don't talk about Fight Club", "No shirts, no shoes", "Fights only last 3 minutes", "Everyone has to fight"], answer: "Don't talk about Fight Club", trivia: "The irony of the first rule is that by repeatedly stating it, the members are breaking it. Director David Fincher intentionally placed 'subliminal' single-frame shots of Tyler Durden throughout the film before his character is introduced." } ]; let currentFilter = 'all'; let correctAnswers = 0; let totalAnswered = 0; function createCardElement(card, index) { const cardElement = document.createElement('div'); cardElement.className = 'card'; cardElement.dataset.category = card.category; // Front of card const cardFront = document.createElement('div'); cardFront.className = 'card-front'; const category = document.createElement('div'); category.className = 'category'; category.textContent = card.category; const difficulty = document.createElement('div'); difficulty.className = `difficulty ${card.difficulty}`; difficulty.textContent = card.difficulty; const question = document.createElement('div'); question.className = 'question'; question.textContent = card.question; const options = document.createElement('div'); options.className = 'options'; card.options.forEach(option => { const optionElement = document.createElement('div'); optionElement.className = 'option'; optionElement.textContent = option; optionElement.addEventListener('click', (e) => { e.stopPropagation(); checkAnswer(option, card.answer, cardElement); }); options.appendChild(optionElement); }); const filmIcon = document.createElement('div'); filmIcon.className = 'film-icon'; filmIcon.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 16"> <path d="M0 1a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V1zm4 0v6h8V1H4zm8 8H4v6h8V9zM1 1v2h2V1H1zm2 3H1v2h2V4zM1 7v2h2V7H1zm2 3H1v2h2v-2zm-2 3v2h2v-2H1zM15 1h-2v2h2V1zm-2 3v2h2V4h-2zm2 3h-2v2h2V7zm-2 3v2h2v-2h-2zm2 3h-2v2h2v-2z"/> </svg>`; cardFront.appendChild(category); cardFront.appendChild(difficulty); cardFront.appendChild(question); cardFront.appendChild(options); cardFront.appendChild(filmIcon); // Back of card const cardBack = document.createElement('div'); cardBack.className = 'card-back'; const answer = document.createElement('div'); answer.className = 'answer'; answer.textContent = `Answer: ${card.answer}`; const triviaTitle = document.createElement('div'); triviaTitle.className = 'trivia-title'; triviaTitle.textContent = 'Did you know?'; const triviaContent = document.createElement('div'); triviaContent.className = 'trivia-content'; triviaContent.textContent = card.trivia; const backButton = document.createElement('button'); backButton.className = 'back-button'; backButton.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> <path d="M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0zm3.5 7.5a.5.5 0 0 1 0 1H5.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L5.707 7.5H11.5z"/> </svg> Back`; backButton.addEventListener('click', (e) => { e.stopPropagation(); cardElement.classList.remove('flipped'); }); cardBack.appendChild(answer); cardBack.appendChild(triviaTitle); cardBack.appendChild(triviaContent); cardBack.appendChild(backButton); cardElement.appendChild(cardFront); cardElement.appendChild(cardBack); return cardElement; } function checkAnswer(selected, correct, cardElement) { totalAnswered++; if (selected === correct) { correctAnswers++; createConfetti(cardElement); } cardElement.classList.add('flipped'); updateProgress(); } function updateProgress() { const progressBar = document.getElementById('progressBar'); const progressPercentage = (totalAnswered / triviaCards.length) * 100; progressBar.style.width = `${progressPercentage}%`; } function createConfetti(cardElement) { const colors = ['#ff3366', '#2e58ff', '#33d6a6', '#ffcc00']; for (let i = 0; i < 20; i++) { const confetti = document.createElement('div'); confetti.className = 'confetti'; confetti.style.left = `${Math.random() * 100}%`; confetti.style.backgroundColor = colors[Math.floor(Math.random() * colors.length)]; confetti.style.width = `${Math.random() * 8 + 4}px`; confetti.style.height = `${Math.random() * 8 + 4}px`; confetti.style.animationDuration = `${Math.random() * 2 + 1}s`; confetti.style.animationDelay = `${Math.random() * 0.5}s`; // Random shape if (Math.random() > 0.5) { confetti.style.borderRadius = '50%'; } else if (Math.random() > 0.5) { confetti.style.transform = 'rotate(45deg)'; confetti.style.borderRadius = '0'; } cardElement.appendChild(confetti); setTimeout(() => { confetti.remove(); }, 3000); } } function filterCards(category) { currentFilter = category; const cards = document.querySelectorAll('.card'); cards.forEach(card => { if (category === 'all' || card.dataset.category === category) { card.style.display = 'block'; } else { card.style.display = 'none'; } }); } // Initialize cards document.addEventListener('DOMContentLoaded', () => { const cardsContainer = document.getElementById('cardsContainer'); // Shuffle cards const shuffledCards = [...triviaCards].sort(() => Math.random() - 0.5); // Create card elements shuffledCards.forEach((card, index) => { const cardElement = createCardElement(card, index); cardsContainer.appendChild(cardElement); }); // Set up filter buttons const filterButtons = document.querySelectorAll('.filter-button'); filterButtons.forEach(button => { button.addEventListener('click', () => { filterButtons.forEach(btn => btn.classList.remove('active')); button.classList.add('active'); filterCards(button.dataset.filter); }); }); }); </script> </body> </html>