Background patterns can transform a simple design into a visually captivating experience. They add depth, texture, and personality to any user interface.
In this article, we will explore 10 stunning background pattern examples that can elevate your design projects. Each example showcases unique styles and applications to inspire your next creation.
CODE1
Here's the code:
CODETEXT1
CODE2
Here's the code:
CODETEXT2
CODE3
Here's the code:
CODETEXT3
CODE4
Here's the code:
CODETEXT4
CODE5
Here's the code:
CODETEXT5
Subframe's drag-and-drop interface and intuitive, responsive canvas make it easy to create pixel-perfect UI every time. Loved by designers and developers alike, Subframe empowers you to design stunning background patterns effortlessly.
Start for free and elevate your design projects 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 design projects? With Subframe, you can create pixel-perfect UIs and stunning background patterns effortlessly. Our drag-and-drop interface ensures efficiency and precision.
Start for free and begin designing immediately. Transform your ideas into reality with Subframe today!
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Poppins', sans-serif; background-color: #f0f5e9; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 700px; width: 100%; max-width: 700px; margin: 0 auto; overflow-x: hidden; position: relative; } /* Nature-inspired background pattern */ body::before { content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(rgba(240, 245, 233, 0.9), rgba(240, 245, 233, 0.9)), 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='%23729b5b' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E"), repeating-linear-gradient(45deg, rgba(139, 167, 114, 0.02) 0px, rgba(139, 167, 114, 0.02) 1px, transparent 1px, transparent 11px), repeating-linear-gradient(135deg, rgba(139, 167, 114, 0.02) 0px, rgba(139, 167, 114, 0.02) 1px, transparent 1px, transparent 11px), linear-gradient(90deg, #f0f5e9, #f0f5e9); z-index: -1; } .container { padding: 20px; width: 100%; max-width: 700px; height: auto; min-height: 700px; display: flex; flex-direction: column; justify-content: space-between; } header { position: relative; padding: 20px; margin-bottom: 30px; text-align: center; } .logo { position: relative; font-size: 2rem; font-weight: 700; color: #3d6641; margin-bottom: 10px; text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.8); } .logo::before { content: ""; position: absolute; width: 40px; height: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233d6641' width='24px' height='24px'%3E%3Cpath d='M6.05 4.14l-.39-.39c-.39-.39-1.02-.38-1.4 0l-.01.01c-.39.39-.39 1.02 0 1.4l.39.39c.39.39 1.01.39 1.4 0l.01-.01c.39-.38.39-1.02 0-1.4zM3.01 10.5H1.99c-.55 0-.99.44-.99.99v.01c0 .55.44.99.99.99H3c.56.01 1-.43 1-.98v-.01c0-.56-.44-1-.99-1zm9-9.95H12c-.56 0-1 .44-1 .99v.96c0 .55.44.99.99.99H12c.56.01 1-.43 1-.98v-.97c0-.55-.44-.99-.99-.99zm7.74 3.21c-.39-.39-1.02-.39-1.41-.01l-.39.39c-.39.39-.39 1.02 0 1.4l.01.01c.39.39 1.02.39 1.4 0l.39-.39c.39-.39.39-1.01 0-1.4zm-1.81 15.1l.39.39c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41l-.39-.39c-.39-.39-1.02-.38-1.4 0-.4.4-.4 1.02-.01 1.41zM20 11.49v.01c0 .55.44.99.99.99H22c.55 0 .99-.44.99-.99v-.01c0-.55-.44-.99-.99-.99h-1.01c-.55 0-.99.44-.99.99zM12 5.5c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm-.01 16.95H12c.55 0 .99-.44.99-.99v-.96c0-.55-.44-.99-.99-.99h-.01c-.55 0-.99.44-.99.99v.96c0 .55.44.99.99.99zm-7.74-3.21c.39.39 1.02.39 1.41 0l.39-.39c.39-.39.38-1.02 0-1.4l-.01-.01c-.39-.39-1.02-.39-1.4 0l-.39.39c-.39.39-.39 1.02 0 1.41z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: contain; left: -45px; top: 0; opacity: 0.8; } .tagline { font-size: 1rem; color: #5a7d54; margin-bottom: 20px; font-weight: 300; } .main-content { flex-grow: 1; display: flex; flex-direction: column; gap: 30px; } .showcase { background: linear-gradient(120deg, #d6e8c9, #c8dfb8); border-radius: 12px; padding: 30px; box-shadow: 0 10px 20px rgba(106, 142, 91, 0.05); position: relative; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; } .showcase:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(106, 142, 91, 0.1); } .showcase::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; 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='%23fff' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E"); opacity: 0.6; z-index: 0; } .showcase-content { position: relative; z-index: 1; } h2 { font-size: 1.4rem; color: #3d6641; margin-bottom: 15px; position: relative; display: inline-block; } h2::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 100%; height: 3px; background: linear-gradient(90deg, #6a8e5b, rgba(106, 142, 91, 0.3)); border-radius: 10px; } p { color: #4b5f43; line-height: 1.6; margin-bottom: 15px; } .feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 30px; } .feature { background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(5px); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; align-items: center; text-align: center; transition: transform 0.3s ease, background 0.3s ease; cursor: pointer; position: relative; overflow: hidden; } .feature:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.8); } .feature::before { content: ''; position: absolute; width: 100%; height: 3px; bottom: 0; left: 0; background: linear-gradient(90deg, #6a8e5b, rgba(106, 142, 91, 0.3)); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease; } .feature:hover::before { transform: scaleX(1); } .feature-icon { width: 50px; height: 50px; margin-bottom: 15px; display: flex; align-items: center; justify-content: center; } .feature-title { font-size: 1rem; color: #3d6641; margin-bottom: 10px; font-weight: 600; } .leaf-icon { position: absolute; width: 30px; height: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233d6641' width='24px' height='24px'%3E%3Cpath d='M6.05 8.05c-2.73 2.73-2.73 7.15-.02 9.88 1.47-3.4 4.09-6.24 7.36-7.93-2.77 2.34-4.71 5.61-5.39 9.32 2.6 1.23 5.8.78 7.95-1.37C19.43 14.47 20 4 20 4S9.53 4.57 6.05 8.05z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: contain; animation: floatLeaf 20s linear infinite; opacity: 0.3; z-index: 0; } .footer { margin-top: 30px; text-align: center; padding: 20px; background: rgba(255, 255, 255, 0.4); border-radius: 12px 12px 0 0; position: relative; } .footer::before { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 5px; background: linear-gradient(90deg, rgba(106, 142, 91, 0.3), rgba(106, 142, 91, 0.7), rgba(106, 142, 91, 0.3)); } .footer p { font-size: 0.9rem; color: #5a7d54; margin-bottom: 0; } .theme-switcher { position: absolute; top: 20px; right: 20px; width: 50px; height: 24px; background-color: rgba(106, 142, 91, 0.2); border-radius: 12px; display: flex; align-items: center; padding: 2px; cursor: pointer; transition: background-color 0.3s ease; } .theme-toggle { width: 20px; height: 20px; background-color: #6a8e5b; border-radius: 50%; transition: transform 0.3s ease; } .dark-mode { background-color: #1e2923; } .dark-mode .container { color: #e0e6dc; } .dark-mode header, .dark-mode .footer { background: rgba(30, 41, 35, 0.6); } .dark-mode h2, .dark-mode .logo, .dark-mode .feature-title { color: #aac9a0; } .dark-mode .showcase { background: linear-gradient(120deg, #2a3c2e, #1e2923); } .dark-mode .feature { background: rgba(42, 60, 46, 0.6); } .dark-mode p, .dark-mode .footer p, .dark-mode .tagline { color: #c9d8c3; } .dark-mode .theme-toggle { transform: translateX(26px); background-color: #aac9a0; } .dark-mode .theme-switcher { background-color: rgba(170, 201, 160, 0.2); } .dark-mode body::before { background: linear-gradient(rgba(30, 41, 35, 0.95), rgba(30, 41, 35, 0.95)), 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='%23aac9a0' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E"), repeating-linear-gradient(45deg, rgba(170, 201, 160, 0.02) 0px, rgba(170, 201, 160, 0.02) 1px, transparent 1px, transparent 11px), repeating-linear-gradient(135deg, rgba(170, 201, 160, 0.02) 0px, rgba(170, 201, 160, 0.02) 1px, transparent 1px, transparent 11px), linear-gradient(90deg, #1e2923, #1e2923); } .wood-grain { position: absolute; width: 100%; height: 40px; bottom: 0; left: 0; background-image: url("data:image/svg+xml,%3Csvg width='300' height='40' viewBox='0 0 300 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h300v40H0V0zm1 1v38h298V1H1zm55 15c10-12 25-12 35 0s25 12 35 0 25-12 35 0 25 12 35 0 25-12 35 0 25 12 35 0' stroke='%236a8e5b' stroke-width='1' fill='none' stroke-opacity='0.12' /%3E%3C/svg%3E"); background-repeat: repeat-x; opacity: 0.6; } .dark-mode .wood-grain { background-image: url("data:image/svg+xml,%3Csvg width='300' height='40' viewBox='0 0 300 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h300v40H0V0zm1 1v38h298V1H1zm55 15c10-12 25-12 35 0s25 12 35 0 25-12 35 0 25 12 35 0 25-12 35 0 25 12 35 0' stroke='%23aac9a0' stroke-width='1' fill='none' stroke-opacity='0.15' /%3E%3C/svg%3E"); } .cta-button { display: inline-block; padding: 10px 25px; margin-top: 15px; background: linear-gradient(135deg, #6a8e5b, #5a7d54); color: white; border: none; border-radius: 25px; font-weight: 600; cursor: pointer; position: relative; overflow: hidden; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(106, 142, 91, 0.2); } .cta-button:hover { box-shadow: 0 7px 20px rgba(106, 142, 91, 0.3); transform: translateY(-2px); } .cta-button::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); transition: all 0.4s ease; } .cta-button:hover::before { left: 100%; } .dark-mode .cta-button { background: linear-gradient(135deg, #8baa7f, #6a8e5b); box-shadow: 0 4px 15px rgba(139, 170, 127, 0.2); } .dark-mode .cta-button:hover { box-shadow: 0 7px 20px rgba(139, 170, 127, 0.3); } @keyframes floatLeaf { 0% { transform: translate(0, -100%) rotate(0deg); } 100% { transform: translate(100vw, 100vh) rotate(360deg); } } @media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } .logo { font-size: 1.7rem; } .showcase { padding: 20px; } h2 { font-size: 1.3rem; } } </style> </head> <body> <div class="container"> <header> <div class="logo">TerraSustain</div> <div class="tagline">Harmonizing design with nature's rhythm</div> <div class="theme-switcher" id="themeSwitcher"> <div class="theme-toggle" id="themeToggle"></div> </div> </header> <div class="main-content"> <div class="showcase"> <div class="leaf-icon" style="top: 10%; left: 20%;"></div> <div class="leaf-icon" style="top: 30%; left: 80%;"></div> <div class="leaf-icon" style="top: 60%; left: 50%;"></div> <div class="leaf-icon" style="top: 80%; left: 10%;"></div> <div class="showcase-content"> <h2>Nature-Inspired Sustainability</h2> <p>Our patterns blend organic textures and earthy tones to create a digital environment that reflects our commitment to preservation. Each element is crafted to evoke the tranquility of forests and the stability of natural wood grain.</p> <p>Designed with sustainability in mind, our backgrounds use minimal resources while maximizing visual impact—mirroring nature's own efficiency.</p> <button class="cta-button">Explore Patterns</button> </div> <div class="wood-grain"></div> </div> <div class="feature-grid"> <div class="feature"> <div class="feature-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#3d6641" width="40px" height="40px"> <path d="M23 3H1v18h22V3zm-2 16H3V5h18v14zM8 15c0-1.66 1.34-3 3-3 .35 0 .69.07 1 .18V6h5v2h-3v7.03c-.02 1.64-1.35 2.97-3 2.97-1.66 0-3-1.34-3-3z"/> </svg> </div> <div class="feature-title">Organic Soundscapes</div> <p>Our audio elements incorporate natural sounds like rustling leaves and gentle streams to enhance the immersive experience.</p> </div> <div class="feature"> <div class="feature-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#3d6641" width="40px" height="40px"> <path d="M7.2 14.4m-3.2 0a3.2 3.2 0 1 0 6.4 0a3.2 3.2 0 1 0 -6.4 0"/> <path d="M17.2 14.4m-3.2 0a3.2 3.2 0 1 0 6.4 0a3.2 3.2 0 1 0 -6.4 0"/> <path d="M15 19l2 2l4 -4"/> <path d="M10 19l-2 2l-4 -4"/> <path d="M12 12a7 7 0 0 0 -7 -7h-1l3 3m4 4l3 3h1a7 7 0 0 0 -7 -7"/> </svg> </div> <div class="feature-title">Seasonal Cycling</div> <p>Our patterns gradually shift throughout the year, reflecting seasonal changes in color tones and textures.</p> </div> <div class="feature"> <div class="feature-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#3d6641" width="40px" height="40px"> <path d="M9 17a3 3 0 1 0 6 0a3 3 0 0 0 -6 0"/> <path d="M12 3l-4 4l4 4l4 -4z"/> <path d="M9 10l-4 0l0 4l4 0z"/> <path d="M19 10l-4 0l0 4l4 0z"/> <path d="M12 14l-4 4l4 4l4 -4z"/> </svg> </div> <div class="feature-title">Layered Textures</div> <p>Multiple grain patterns combine to create depth that mimics the complex textures found in natural environments.</p> </div> <div class="feature"> <div class="feature-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#3d6641" width="40px" height="40px"> <path d="M12 18.5l-3 -1.5l-6 3v-13l6 -3l6 3l6 -3v7.5"/> <path d="M9 4v13"/> <path d="M15 7v5.5"/> <path d="M21.121 20.121a3 3 0 1 0 -4.242 0c.418 .419 1.125 1.045 2.121 1.879c1.051 -.89 1.759 -1.516 2.121 -1.879z"/> <path d="M19 18v.01"/> </svg> </div> <div class="feature-title">Eco-Performance</div> <p>Our lightweight patterns are optimized to reduce carbon footprint while maintaining visual richness.</p> </div> </div> </div> <div class="footer"> <p>Each pattern is crafted to honor nature's intricate design while supporting your sustainable digital presence.</p> </div> </div> <script> // Generate animated leaves function createLeaves() { const container = document.querySelector('.container'); const numLeaves = 15; for (let i = 0; i < numLeaves; i++) { const leaf = document.createElement('div'); leaf.classList.add('leaf-icon'); // Randomize position const randomX = Math.random() * 100; const randomY = Math.random() * 100; const randomDelay = Math.random() * 20; const randomDuration = 15 + Math.random() * 30; leaf.style.left = `${randomX}%`; leaf.style.top = `-50px`; leaf.style.animationDelay = `${randomDelay}s`; leaf.style.animationDuration = `${randomDuration}s`; container.appendChild(leaf); } } // Theme switcher functionality document.addEventListener('DOMContentLoaded', function() { const themeToggle = document.getElementById('themeSwitcher'); const body = document.body; // Check localStorage for saved theme preference if (localStorage.getItem('darkMode') === 'true') { body.classList.add('dark-mode'); } themeToggle.addEventListener('click', function() { body.classList.toggle('dark-mode'); // Save preference to localStorage localStorage.setItem('darkMode', body.classList.contains('dark-mode')); }); // Initialize features createLeaves(); // Add interaction to features const features = document.querySelectorAll('.feature'); features.forEach(feature => { feature.addEventListener('mouseenter', function() { this.style.transform = 'translateY(-5px) scale(1.02)'; }); feature.addEventListener('mouseleave', function() { this.style.transform = ''; }); feature.addEventListener('click', function() { // Add pop effect on click this.animate([ { transform: 'scale(0.95)' }, { transform: 'scale(1.02)' } ], { duration: 300, easing: 'ease-out' }); }); }); // CTA button effect const ctaButton = document.querySelector('.cta-button'); ctaButton.addEventListener('click', function(e) { // Create ripple effect const ripple = document.createElement('span'); ripple.classList.add('ripple'); this.appendChild(ripple); const rect = this.getBoundingClientRect(); const size = Math.max(rect.width, rect.height);
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Tech Geometric Pattern Background</title> <style> :root { --primary-dark: #0f172a; --secondary-dark: #1e293b; --accent-neon: #00f2ff; --accent-purple: #6d28d9; --accent-blue: #2563eb; --grid-color: rgba(59, 130, 246, 0.1); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background-color: var(--primary-dark); color: white; height: 100vh; width: 100%; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; } .geometric-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden; } .grid { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: linear-gradient(to right, var(--grid-color) 1px, transparent 1px), linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px); background-size: 30px 30px; opacity: 0.7; transform: perspective(500px) rotateX(30deg); transform-origin: top; } .polygon { position: absolute; opacity: 0.6; filter: blur(3px); animation: float 15s infinite ease-in-out; } @keyframes float { 0%, 100% { transform: translateY(0) translateX(0) rotate(0deg); } 25% { transform: translateY(-20px) translateX(10px) rotate(5deg); } 50% { transform: translateY(10px) translateX(-15px) rotate(-3deg); } 75% { transform: translateY(-15px) translateX(-5px) rotate(3deg); } } .content { position: relative; z-index: 10; max-width: 600px; padding: 2rem; text-align: center; } h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 1.5rem; line-height: 1.2; background: linear-gradient(45deg, #fff, var(--accent-neon)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: -0.03em; } p { font-size: 1.1rem; line-height: 1.6; color: rgba(255, 255, 255, 0.8); margin-bottom: 2rem; } .cta-btn { background: linear-gradient(45deg, var(--accent-blue), var(--accent-purple)); color: white; border: none; padding: 0.9rem 2rem; font-size: 1rem; font-weight: 600; border-radius: 8px; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; box-shadow: 0 4px 20px rgba(0, 242, 255, 0.3); } .cta-btn::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; } .cta-btn:hover { transform: translateY(-3px); box-shadow: 0 6px 25px rgba(0, 242, 255, 0.5); } .cta-btn:hover::before { left: 100%; } .tech-metrics { display: flex; justify-content: space-between; margin-top: 3rem; width: 100%; } .metric { text-align: center; position: relative; padding: 1rem; width: 32%; border-radius: 8px; background: rgba(30, 41, 59, 0.4); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.1); transition: transform 0.3s ease, box-shadow 0.3s ease; } .metric:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0, 242, 255, 0.2); } .metric-number { font-size: 2rem; font-weight: 700; color: var(--accent-neon); margin-bottom: 0.5rem; } .metric-label { font-size: 0.9rem; color: rgba(255, 255, 255, 0.7); } .cursor-effect { pointer-events: none; position: absolute; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(0, 242, 255, 0.2) 0%, rgba(0, 242, 255, 0) 70%); transform: translate(-50%, -50%); z-index: 1; opacity: 0; transition: opacity 0.3s ease; } .glow-point { position: absolute; width: 4px; height: 4px; border-radius: 50%; background-color: var(--accent-neon); box-shadow: 0 0 10px 2px var(--accent-neon); opacity: 0; pointer-events: none; z-index: 2; } @media (max-width: 700px) { h1 { font-size: 2rem; } p { font-size: 1rem; } .tech-metrics { flex-direction: column; gap: 1rem; } .metric { width: 100%; } } </style> </head> <body> <div class="geometric-bg" id="geometricBg"> <div class="grid"></div> <!-- Polygons will be dynamically added with JS --> </div> <div class="cursor-effect" id="cursorEffect"></div> <div class="content"> <h1>Quantum Edge Computing Solutions</h1> <p>Harness the computational power at the edge of possibility. Our proprietary algorithmic mesh technology reduces latency by 87% while increasing processing efficiency across distributed systems.</p> <button class="cta-btn" id="ctaButton">Experience The Demo</button> <div class="tech-metrics"> <div class="metric"> <div class="metric-number" data-target="93">0</div> <div class="metric-label">Processing Efficiency</div> </div> <div class="metric"> <div class="metric-number" data-target="17">0</div> <div class="metric-label">ms Response Time</div> </div> <div class="metric"> <div class="metric-number" data-target="99">0</div> <div class="metric-label">Uptime Reliability</div> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Generate polygons const geometricBg = document.getElementById('geometricBg'); const colors = [ 'rgba(0, 242, 255, 0.2)', // Neon cyan 'rgba(109, 40, 217, 0.2)', // Purple 'rgba(37, 99, 235, 0.2)', // Blue 'rgba(6, 182, 212, 0.2)' // Teal ]; // Generate polygon shapes for (let i = 0; i < 15; i++) { const polygon = document.createElement('div'); polygon.classList.add('polygon'); // Random properties const size = Math.random() * 150 + 50; const sides = Math.floor(Math.random() * 3) + 3; // 3 to 5 sides const color = colors[Math.floor(Math.random() * colors.length)]; const left = Math.random() * 100; const top = Math.random() * 100; const delay = Math.random() * 5; const duration = Math.random() * 10 + 10; // Create polygon SVG const svgNS = "http://www.w3.org/2000/svg"; const svg = document.createElementNS(svgNS, "svg"); svg.setAttribute("width", size); svg.setAttribute("height", size); svg.setAttribute("viewBox", "0 0 100 100"); const polygon_svg = document.createElementNS(svgNS, "polygon"); let points = ""; // Calculate polygon points for (let j = 0; j < sides; j++) { const angle = j * (2 * Math.PI / sides); const x = 50 + 40 * Math.cos(angle); const y = 50 + 40 * Math.sin(angle); points += `${x},${y} `; } polygon_svg.setAttribute("points", points); polygon_svg.setAttribute("fill", color); polygon_svg.setAttribute("stroke", "rgba(255, 255, 255, 0.1)"); polygon_svg.setAttribute("stroke-width", "1"); svg.appendChild(polygon_svg); polygon.appendChild(svg); // Style the polygon polygon.style.left = `${left}%`; polygon.style.top = `${top}%`; polygon.style.animationDelay = `${delay}s`; polygon.style.animationDuration = `${duration}s`; geometricBg.appendChild(polygon); } // Animate metrics const metrics = document.querySelectorAll('.metric-number'); metrics.forEach(metric => { const target = parseInt(metric.getAttribute('data-target')); const duration = 2000; // 2 seconds const interval = 20; const steps = duration / interval; const increment = target / steps; let current = 0; const timer = setInterval(() => { current += increment; if (current >= target) { metric.textContent = target; clearInterval(timer); } else { metric.textContent = Math.floor(current); } }, interval); }); // Cursor effect const cursorEffect = document.getElementById('cursorEffect'); document.addEventListener('mousemove', (e) => { cursorEffect.style.opacity = '1'; cursorEffect.style.left = `${e.clientX}px`; cursorEffect.style.top = `${e.clientY}px`; // Create occasional glow points if (Math.random() < 0.05) { createGlowPoint(e.clientX, e.clientY); } }); document.addEventListener('mouseleave', () => { cursorEffect.style.opacity = '0'; }); // CTA button effect const ctaButton = document.getElementById('ctaButton'); ctaButton.addEventListener('mouseenter', () => { for (let i = 0; i < 5; i++) { const x = ctaButton.offsetLeft + Math.random() * ctaButton.offsetWidth; const y = ctaButton.offsetTop + Math.random() * ctaButton.offsetHeight; createGlowPoint(x, y); } }); ctaButton.addEventListener('click', (e) => { e.preventDefault(); // Pulse effect ctaButton.style.transform = 'scale(0.95)'; setTimeout(() => { ctaButton.style.transform = ''; }, 150); // Create glow points in burst pattern for (let i = 0; i < 15; i++) { const x = e.clientX; const y = e.clientY; createGlowPoint(x, y, true); } }); function createGlowPoint(x, y, isBurst = false) { const point = document.createElement('div'); point.classList.add('glow-point'); document.body.appendChild(point); // Position point.style.left = `${x}px`; point.style.top = `${y}px`; // Animation setTimeout(() => { point.style.opacity = '1'; if (isBurst) { const angle = Math.random() * Math.PI * 2; const distance = Math.random() * 100 + 50; const duration = Math.random() * 1000 + 500; point.style.transition = `all ${duration/1000}s ease-out`; point.style.transform = `translate(${Math.cos(angle) * distance}px, ${Math.sin(angle) * distance}px)`; } else { const xMove = (Math.random() - 0.5) * 100; const yMove = (Math.random() - 0.5) * 100; const duration = Math.random() * 1000 + 1000; point.style.transition = `all ${duration/1000}s ease-out`; point.style.transform = `translate(${xMove}px, ${yMove}px)`; } setTimeout(() => { point.style.opacity = '0'; setTimeout(() => { point.remove(); }, 300); }, isBurst ? 300 : 700); }, 10); } }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Maison - Minimalist Fashion</title> <style> @import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500&family=Jost:wght@200;300;400&display=swap'); :root { --beige: #f5f2ed; --taupe: #b3ada0; --charcoal: #303030; --slate: #8c8c8c; --ivory: #fffef9; } * { margin: 0; padding: 0; box-sizing: border-box; } body { background-color: var(--beige); color: var(--charcoal); font-family: 'Jost', sans-serif; font-weight: 300; overflow-x: hidden; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; } .container { width: 100%; max-width: 700px; height: 700px; padding: 2rem; position: relative; overflow: hidden; } .abstract-pattern { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.08; pointer-events: none; } .pattern-line { position: absolute; background-color: var(--charcoal); transform-origin: center; } header { position: relative; z-index: 2; } .logo { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: 1.8rem; letter-spacing: 0.3rem; margin-bottom: 0.8rem; position: relative; display: inline-block; } .logo::after { content: ''; position: absolute; width: 40px; height: 1px; background-color: var(--charcoal); bottom: -8px; left: 2px; transform: scaleX(0); transform-origin: left; transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1); } .logo:hover::after { transform: scaleX(1); } .tagline { font-size: 0.85rem; letter-spacing: 0.1rem; color: var(--slate); margin-bottom: 3rem; } .product-showcase { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; position: relative; z-index: 2; margin-top: 3rem; } .product { position: relative; overflow: hidden; height: 240px; cursor: pointer; transition: transform 0.4s ease; } .product:hover { transform: translateY(-5px); } .product-image { width: 100%; height: 100%; background-position: center; background-size: cover; transition: transform 0.7s cubic-bezier(0.19, 1, 0.22, 1); } .product:hover .product-image { transform: scale(1.05); } .product-1 .product-image { background-image: url('https://images.unsplash.com/photo-1539109136881-3be0616acf4b?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=687&q=80'); } .product-2 .product-image { background-image: url('https://images.unsplash.com/photo-1515886657613-9f3515b0c78f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=720&q=80'); } .product-3 .product-image { background-image: url('https://images.unsplash.com/photo-1525507119028-ed4c629a60a3?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=735&q=80'); } .product-4 .product-image { background-image: url('https://images.unsplash.com/photo-1574201635302-388dd92a4c3f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=765&q=80'); } .product-info { position: absolute; bottom: 0; left: 0; width: 100%; padding: 1rem; background: linear-gradient(to top, rgba(250, 248, 245, 0.9), rgba(250, 248, 245, 0)); transform: translateY(100%); transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1); pointer-events: none; } .product:hover .product-info { transform: translateY(0); } .product-name { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 1.2rem; letter-spacing: 0.05rem; margin-bottom: 0.3rem; } .product-price { font-size: 0.85rem; color: var(--slate); } .collection-link { position: relative; z-index: 2; display: inline-block; margin-top: 2.5rem; font-size: 0.85rem; letter-spacing: 0.1rem; text-transform: uppercase; color: var(--charcoal); text-decoration: none; padding: 0.8rem 0; overflow: hidden; } .collection-link::before { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 1px; background-color: var(--charcoal); transform: scaleX(0.2); transform-origin: left; transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1); } .collection-link:hover::before { transform: scaleX(1); } .scroll-indicator { position: absolute; bottom: 2rem; right: 2rem; width: 30px; height: 50px; border: 1px solid var(--slate); border-radius: 20px; display: flex; justify-content: center; opacity: 0.7; z-index: 2; } .scroll-dot { width: 5px; height: 5px; background-color: var(--slate); border-radius: 50%; position: absolute; top: 8px; animation: scrollAnimation 2s ease-in-out infinite; } @keyframes scrollAnimation { 0% { top: 8px; opacity: 1; } 50% { top: 30px; opacity: 0.3; } 100% { top: 8px; opacity: 1; } } .cursor { width: 30px; height: 30px; border: 1px solid var(--charcoal); border-radius: 50%; position: fixed; pointer-events: none; mix-blend-mode: difference; transform: translate(-50%, -50%); z-index: 10; transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease, opacity 0.2s ease; opacity: 0; } @media (max-width: 600px) { .product-showcase { grid-template-columns: 1fr; gap: 1.5rem; } .product { height: 200px; } .container { padding: 1.5rem; } .logo { font-size: 1.5rem; } .cursor { display: none; } } .color-mode-toggle { position: absolute; top: 2rem; right: 2rem; z-index: 10; width: 22px; height: 22px; background: none; border: none; cursor: pointer; display: flex; justify-content: center; align-items: center; } .toggle-icon { width: 100%; height: 100%; position: relative; } .moon, .sun { position: absolute; top: 0; left: 0; width: 100%; height: 100%; transition: opacity 0.3s ease, transform 0.5s ease; } .moon { border: 1px solid var(--charcoal); border-radius: 50%; transform: scale(0.8); opacity: 0; } .sun { border-radius: 50%; border: 1px solid var(--charcoal); opacity: 1; } .sun::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40%; height: 40%; border-radius: 50%; background-color: var(--charcoal); } body.dark-mode { background-color: var(--charcoal); color: var(--beige); } body.dark-mode .pattern-line { background-color: var(--taupe); } body.dark-mode .logo::after { background-color: var(--beige); } body.dark-mode .collection-link::before { background-color: var(--beige); } body.dark-mode .collection-link { color: var(--beige); } body.dark-mode .product-info { background: linear-gradient(to top, rgba(48, 48, 48, 0.9), rgba(48, 48, 48, 0)); } body.dark-mode .scroll-indicator { border-color: var(--taupe); } body.dark-mode .scroll-dot { background-color: var(--taupe); } body.dark-mode .cursor { border-color: var(--beige); } body.dark-mode .moon { opacity: 1; transform: scale(1); border-color: var(--beige); } body.dark-mode .sun { opacity: 0; transform: scale(0.8); border-color: var(--beige); } </style> </head> <body> <div class="container"> <div class="abstract-pattern" id="pattern"></div> <header> <h1 class="logo">MAISON</h1> <p class="tagline">Refined simplicity. Timeless design.</p> </header> <section class="product-showcase"> <div class="product product-1"> <div class="product-image"></div> <div class="product-info"> <div class="product-name">Minimalist Wool Coat</div> <div class="product-price">€495</div> </div> </div> <div class="product product-2"> <div class="product-image"></div> <div class="product-info"> <div class="product-name">Structured Linen Dress</div> <div class="product-price">€325</div> </div> </div> <div class="product product-3"> <div class="product-image"></div> <div class="product-info"> <div class="product-name">Tailored Silk Blouse</div> <div class="product-price">€275</div> </div> </div> <div class="product product-4"> <div class="product-image"></div> <div class="product-info"> <div class="product-name">Sculptural Leather Bag</div> <div class="product-price">€420</div> </div> </div> </section> <a href="#" class="collection-link">View Autumn Collection</a> <div class="scroll-indicator"> <div class="scroll-dot"></div> </div> <button class="color-mode-toggle" aria-label="Toggle color mode"> <div class="toggle-icon"> <div class="sun"></div> <div class="moon"></div> </div> </button> </div> <div class="cursor"></div> <script> // Create abstract pattern const pattern = document.getElementById('pattern'); const lineCount = 40; for (let i = 0; i < lineCount; i++) { const line = document.createElement('div'); line.classList.add('pattern-line'); const angle = Math.random() * 180; const length = Math.random() * 100 + 50; const posX = Math.random() * 100; const posY = Math.random() * 100; const thickness = Math.random() * 0.5 + 0.2; line.style.width = `${length}px`; line.style.height = `${thickness}px`; line.style.left = `${posX}%`; line.style.top = `${posY}%`; line.style.transform = `rotate(${angle}deg)`; pattern.appendChild(line); } // Custom cursor const cursor = document.querySelector('.cursor'); const links = document.querySelectorAll('a, button, .product'); 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'; }); links.forEach(link => { link.addEventListener('mouseenter', () => { cursor.style.width = '50px'; cursor.style.height = '50px'; cursor.style.mixBlendMode = 'exclusion'; }); link.addEventListener('mouseleave', () => { cursor.style.width = '30px'; cursor.style.height = '30px'; cursor.style.mixBlendMode = 'difference'; }); }); // Dark mode toggle const colorModeToggle = document.querySelector('.color-mode-toggle'); colorModeToggle.addEventListener('click', () => { document.body.classList.toggle('dark-mode'); }); // Product hover effect animation const products = document.querySelectorAll('.product'); products.forEach(product => { product.addEventListener('mouseenter', () => { const image = product.querySelector('.product-image'); const info = product.querySelector('.product-info'); image.style.transition = 'transform 0.7s cubic-bezier(0.19, 1, 0.22, 1)'; info.style.transition = 'transform 0.5s cubic-bezier(0.19, 1, 0.22, 1)'; }); }); // Prevent default on links to avoid page refresh in embed document.querySelectorAll('a').forEach(link => { link.addEventListener('click', (e) => { e.preventDefault(); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Industrial Pattern - Manufacturing Portal</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; } :root { --steel-dark: #1c2124; --steel-medium: #343a40; --rust-color: #8b4513; --rust-light: #a55d2c; --concrete: #b0b0b0; --weld-glow: #ff8c00; } body, html { font-family: 'Roboto Condensed', sans-serif; width: 100%; height: 100%; overflow: hidden; background-color: var(--steel-dark); color: #f0f0f0; } .container { width: 100%; height: 100%; position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 20px; } .industrial-pattern { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-image: linear-gradient(45deg, var(--steel-dark) 25%, transparent 25%), linear-gradient(-45deg, var(--steel-dark) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--steel-dark) 75%), linear-gradient(-45deg, transparent 75%, var(--steel-dark) 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0px; opacity: 0.05; z-index: 0; } .metal-panel { display: flex; flex-direction: column; background: linear-gradient(145deg, var(--steel-medium), var(--steel-dark)); border-radius: 5px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); overflow: hidden; position: relative; width: 80%; max-width: 600px; z-index: 1; transform: translateZ(0); } /* Metal texture overlay */ .metal-panel::before { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; 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%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.1'/%3E%3C/svg%3E"); opacity: 0.15; pointer-events: none; } .panel-header { padding: 24px; border-bottom: 3px solid var(--rust-color); background: linear-gradient(90deg, var(--steel-dark), var(--steel-medium)); position: relative; overflow: hidden; } .panel-header::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 120px; background: linear-gradient(90deg, transparent, rgba(139, 69, 19, 0.2), transparent); transform: skewX(-30deg) translateX(-10px); animation: header-shine 4s infinite; } @keyframes header-shine { 0% { transform: skewX(-30deg) translateX(-200px); } 30% { transform: skewX(-30deg) translateX(400px); } 100% { transform: skewX(-30deg) translateX(400px); } } .logo { font-size: 24px; font-weight: 700; letter-spacing: 1px; margin-bottom: 8px; display: flex; align-items: center; } .logo-icon { width: 32px; height: 32px; margin-right: 12px; background: var(--rust-color); border-radius: 4px; display: flex; align-items: center; justify-content: center; position: relative; } .logo-icon::before, .logo-icon::after { content: ""; position: absolute; background: var(--concrete); border-radius: 50%; } .logo-icon::before { width: 8px; height: 8px; top: 5px; left: 5px; } .logo-icon::after { width: 6px; height: 6px; bottom: 5px; right: 5px; } .gear-icon { width: 20px; height: 20px; fill: #fff; } .panel-content { padding: 24px; position: relative; z-index: 2; } .panel-title { font-size: 20px; font-weight: 500; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--concrete); position: relative; display: inline-block; } .panel-title::after { content: ""; position: absolute; left: 0; bottom: -8px; width: 0; height: 3px; background: var(--rust-light); transition: width 0.3s ease-out; } .metal-panel:hover .panel-title::after { width: 100%; } .info-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 24px; } .info-item { background: rgba(0, 0, 0, 0.2); border-left: 3px solid var(--rust-color); padding: 15px; border-radius: 2px; position: relative; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; } .info-item:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); } .info-item h3 { font-size: 16px; margin-bottom: 8px; color: var(--weld-glow); } .info-item p { font-size: 14px; color: #d0d0d0; line-height: 1.5; } .rivets { position: absolute; width: 12px; height: 12px; background: linear-gradient(135deg, var(--concrete), #7a7a7a); border-radius: 50%; box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.5); z-index: 3; } .rivet-1 { top: 10px; left: 10px; } .rivet-2 { top: 10px; right: 10px; } .rivet-3 { bottom: 10px; left: 10px; } .rivet-4 { bottom: 10px; right: 10px; } .login-form { margin-top: 10px; } .form-group { margin-bottom: 15px; } .form-group label { display: block; margin-bottom: 5px; font-size: 14px; color: var(--concrete); } .form-control { width: 100%; padding: 10px 12px; background-color: rgba(0, 0, 0, 0.3); border: 1px solid var(--steel-medium); border-radius: 3px; color: #fff; font-family: inherit; transition: all 0.3s ease; } .form-control:focus { border-color: var(--rust-color); outline: none; box-shadow: 0 0 0 2px rgba(139, 69, 19, 0.3); } .login-btn { background: linear-gradient(90deg, var(--rust-color), var(--rust-light)); border: none; color: white; padding: 12px 24px; font-weight: 600; letter-spacing: 1px; border-radius: 3px; cursor: pointer; transition: all 0.3s ease; text-transform: uppercase; position: relative; overflow: hidden; width: 100%; } .login-btn:hover { background: linear-gradient(90deg, var(--rust-light), var(--rust-color)); box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3); } .login-btn::after { content: ""; position: absolute; top: 0; left: 0; width: 0; height: 100%; background-color: rgba(255, 255, 255, 0.2); transition: width 0.3s ease; } .login-btn:hover::after { width: 100%; } .portal-info { position: absolute; bottom: 20px; text-align: center; color: var(--concrete); font-size: 12px; opacity: 0.6; z-index: 1; } /* Animated welding sparks */ .weld-spark { position: absolute; width: 2px; height: 2px; background-color: var(--weld-glow); border-radius: 50%; opacity: 0; filter: blur(1px); box-shadow: 0 0 6px 2px var(--weld-glow); z-index: 10; pointer-events: none; } /* Distressed texture overlay */ .distressed-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noisy'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noisy)' opacity='0.1'/%3E%3C/svg%3E"); opacity: 0.09; z-index: 2; pointer-events: none; } @media (max-width: 600px) { .metal-panel { width: 95%; } .info-items { grid-template-columns: 1fr; } .panel-header, .panel-content { padding: 15px; } .logo { font-size: 20px; } } @keyframes spark { 0% { opacity: 0; transform: scale(0.1) translateY(0); } 20% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(0.1) translateY(20px) translateX(10px); } } </style> </head> <body> <div class="container"> <div class="industrial-pattern"></div> <div class="metal-panel"> <div class="rivets rivet-1"></div> <div class="rivets rivet-2"></div> <div class="rivets rivet-3"></div> <div class="rivets rivet-4"></div> <div class="panel-header"> <div class="logo"> <div class="logo-icon"> <svg class="gear-icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19.14,12.94c0.04-0.3,0.06-0.61,0.06-0.94c0-0.32-0.02-0.64-0.07-0.94l2.03-1.58c0.18-0.14,0.23-0.41,0.12-0.61 l-1.92-3.32c-0.12-0.22-0.37-0.29-0.59-0.22l-2.39,0.96c-0.5-0.38-1.03-0.7-1.62-0.94L14.4,2.81c-0.04-0.24-0.24-0.41-0.48-0.41 h-3.84c-0.24,0-0.43,0.17-0.47,0.41L9.25,5.35C8.66,5.59,8.12,5.92,7.63,6.29L5.24,5.33c-0.22-0.08-0.47,0-0.59,0.22L2.74,8.87 C2.62,9.08,2.66,9.34,2.86,9.48l2.03,1.58C4.84,11.36,4.8,11.69,4.8,12s0.02,0.64,0.07,0.94l-2.03,1.58 c-0.18,0.14-0.23,0.41-0.12,0.61l1.92,3.32c0.12,0.22,0.37,0.29,0.59,0.22l2.39-0.96c0.5,0.38,1.03,0.7,1.62,0.94l0.36,2.54 c0.05,0.24,0.24,0.41,0.48,0.41h3.84c0.24,0,0.44-0.17,0.47-0.41l0.36-2.54c0.59-0.24,1.13-0.56,1.62-0.94l2.39,0.96 c0.22,0.08,0.47,0,0.59-0.22l1.92-3.32c0.12-0.22,0.07-0.47-0.12-0.61L19.14,12.94z M12,15.6c-1.98,0-3.6-1.62-3.6-3.6 s1.62-3.6,3.6-3.6s3.6,1.62,3.6,3.6S13.98,15.6,12,15.6z" fill="currentColor"/> </svg> </div> FORGECORE </div> <div style="font-size: 14px; color: var(--concrete);">Manufacturing Portal</div> </div> <div class="panel-content"> <h2 class="panel-title">OPERATOR DASHBOARD</h2> <div class="info-items"> <div class="info-item"> <h3>Production Status</h3> <p>Current line efficiency: 94.2%</p> <p>Active stations: 12/14</p> </div> <div class="info-item"> <h3>Quality Control</h3> <p>Last inspection: 28 min ago</p> <p>Defect rate: 0.3%</p> </div> </div> <div class="login-form"> <div class="form-group"> <label for="username">Employee ID</label> <input type="text" id="username" class="form-control" placeholder="Enter ID number" autocomplete="off"> </div> <div class="form-group"> <label for="password">Access Code</label> <input type="password" id="password" class="form-control" placeholder="Enter your access code"> </div> <button type="button" class="login-btn" id="loginBtn">Access System</button> </div> </div> <div class="distressed-overlay"></div> </div> <div class="portal-info"> ForgeCore Manufacturing Solutions — Secure Production Network v.3.7.2 </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Login button interaction const loginBtn = document.getElementById('loginBtn'); const panel = document.querySelector('.metal-panel'); loginBtn.addEventListener('click', function(e) { e.preventDefault(); this.classList.add('clicked'); // Create sparks animation createSparks(e); // Simulate button press feedback this.style.transform = 'scale(0.98)'; setTimeout(() => { this.style.transform = 'scale(1)'; // Add a rust/metal texture shine effect const shine = document.createElement('div'); shine.style.position = 'absolute'; shine.style.top = '0'; shine.style.left = '0'; shine.style.right = '0'; shine.style.bottom = '0'; shine.style.background = 'linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent)'; shine.style.zIndex = '10'; shine.style.opacity = '0'; shine.style.transition = 'opacity 1s ease'; panel.appendChild(shine); setTimeout(() => { shine.style.opacity = '1'; setTimeout(() => { shine.style.opacity = '0'; setTimeout(() => { shine.remove(); }, 1000); }, 500); }, 10); }, 150); }); // Form field interaction with industrial feeling const formControls = document.querySelectorAll('.form-control'); formControls.forEach(control => { control.addEventListener('focus', function() { // Metal texture movement on focus this.style.backgroundImage = 'linear-gradient(to right, rgba(0,0,0,0.4), rgba(0,0,0,0.2))'; }); control.addEventListener('blur', function() { this.style.backgroundImage = 'none'; }); control.addEventListener('input', function() { // Subtle typing effect - creates a small welding spark when typing if (Math.random() > 0.7) { const rect = this.getBoundingClientRect(); const x = rect.left + Math.random() * rect.width; const y = rect.top; createWeldingSpark(x, y); } }); }); // Create industrial welding spark effect function createWeldingSpark(x, y) { const spark = document.createElement('div'); spark.classList.add('weld-spark'); spark.style.left = `${x}px`; spark.style.top = `${y}px`; document.body.appendChild(spark); // Animate the spark spark.style.animation = `spark ${0.3 + Math.random() * 0.5}s ease-out`; // Remove the spark after animation spark.addEventListener('animationend', function() { spark.remove(); }); } // Create multiple sparks on button click function createSparks(e) { const rect = e.target.getBoundingClientRect(); const centerX = rect.left + rect.width / 2; const centerY = rect.top + rect.height / 2; for (let i = 0; i < 12; i++) { const offsetX = (Math.random() - 0.5) * rect.width; const offsetY = (Math.random() - 0.5) * rect.height; setTimeout(() => { createWeldingSpark(centerX + offsetX, centerY + offsetY); }, i * 50); } } // Simulate rivets shadow changes based on mouse movement document.addEventListener('mousemove', function(e) { const rivets = document.querySelectorAll('.rivets'); const container = document.querySelector('.container'); const rect = container.getBoundingClientRect(); const mouseX = e.clientX - rect.left; const mouseY = e.clientY - rect.top; rivets.forEach(rivet => { const rivetRect = rivet.getBoundingClientRect(); const rivetCenterX = rivetRect.left + rivetRect.width / 2 - rect.left; const rivetCenterY = rivetRect.top + rivetRect.height / 2 - rect.top; const deltaX = mouseX - rivetCenterX; const deltaY = mouseY - rivetCenterY; const angle = Math.atan2(deltaY, deltaX) * (180 / Math.PI); const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY); const intensity = Math.min(1, 150 / distance); const shadowX = Math.cos((angle + 180) * Math.PI / 180) * 2 * intensity; const shadowY = Math.sin((angle + 180) * Math.PI / 180) * 2 * intensity; rivet.style.boxShadow = ` inset ${shadowX}px ${shadowY}px 2px rgba(0,0,0,0.5), inset ${-shadowX * 0.5}px ${-shadowY * 0.5}px 2px rgba(255,255,255,0.1) `; }); }); // Random subtle metal creaking and ambient factory sounds function playRandomSound() { if (Math.random() > 0.8) { const panel = document.querySelector('.metal-panel'); panel.style.transition = 'transform 0.5s ease'; // Slight random shift to simulate metal stress const randomX = (Math.random() - 0.5) * 0.5; const randomY = (Math.random() - 0.5) * 0.5; panel.style.transform = `translate(${randomX}px, ${randomY}px)`; setTimeout(() => { panel.style.transform = 'translate(0, 0)'; }, 500); } setTimeout(playRandomSound, 3000 + Math.random() * 5000); } playRandomSound(); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>LearnyDots & FunStripes</title> <style> @import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;700&family=Nunito:wght@400;700&display=swap'); * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Nunito', sans-serif; background-color: #f9f4ff; height: 700px; width: 700px; overflow: hidden; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; } .bg-pattern { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.4; overflow: hidden; } .stripe { position: absolute; background: linear-gradient(45deg, rgba(255,0,0,0.3) 0%, rgba(255,255,0,0.3) 100%); transform-origin: center; border-radius: 8px; } .dot { position: absolute; border-radius: 50%; background-color: rgba(0, 119, 255, 0.5); transform-origin: center; } .app-container { background-color: white; border-radius: 30px; width: 90%; max-width: 550px; height: 520px; padding: 20px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); position: relative; overflow: hidden; transition: transform 0.3s ease; } .app-container:hover { transform: translateY(-5px); } .app-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } .app-title { font-family: 'Baloo 2', cursive; font-size: 32px; color: #4a2baa; text-shadow: 2px 2px 0px rgba(255, 230, 0, 0.5); } .app-nav { display: flex; gap: 10px; } .nav-btn { background-color: #f0f0f0; border: none; border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s ease; } .nav-btn:hover { background-color: #e0e0ff; transform: scale(1.1); } .main-content { display: grid; grid-template-columns: repeat(2, 1fr); grid-gap: 20px; padding: 10px; height: 380px; } .learning-module { background-color: #ffffff; border-radius: 20px; padding: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; position: relative; overflow: hidden; transition: all 0.3s ease; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05); } .learning-module:hover { transform: scale(1.03); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); } .module-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.15; } .module-icon { font-size: 32px; margin-bottom: 15px; background-color: #ffe100; width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 5px 15px rgba(255, 225, 0, 0.3); } .colors-icon { background-color: #FF5252; box-shadow: 0 5px 15px rgba(255, 82, 82, 0.3); } .shapes-icon { background-color: #4CAF50; box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3); } .numbers-icon { background-color: #2196F3; box-shadow: 0 5px 15px rgba(33, 150, 243, 0.3); } .module-title { font-family: 'Baloo 2', cursive; font-size: 20px; color: #4a2baa; margin-bottom: 8px; text-align: center; } .module-desc { font-size: 14px; color: #666; text-align: center; line-height: 1.4; } .floating-shapes { position: absolute; width: 100%; height: 100%; pointer-events: none; z-index: 10; } .shape { position: absolute; opacity: 0; transform: scale(0); border-radius: 3px; } .app-footer { display: flex; justify-content: center; margin-top: 20px; gap: 15px; } .footer-btn { background-color: #4a2baa; color: white; border: none; border-radius: 30px; padding: 12px 25px; font-family: 'Baloo 2', cursive; font-size: 18px; cursor: pointer; transition: all 0.2s ease; } .footer-btn:hover { background-color: #3a1a9a; transform: translateY(-3px); box-shadow: 0 5px 15px rgba(74, 43, 170, 0.3); } .progress-dots { display: flex; gap: 8px; margin-top: 20px; } .progress-dot { width: 12px; height: 12px; border-radius: 50%; background-color: #e0e0e0; transition: all 0.3s ease; } .progress-dot.active { background-color: #4a2baa; transform: scale(1.2); } @media (max-width: 600px) { .app-container { width: 95%; height: 480px; padding: 15px; } .app-title { font-size: 26px; } .main-content { grid-template-columns: 1fr; grid-gap: 15px; height: 330px; overflow-y: auto; } .learning-module { padding: 12px; } .module-icon { width: 50px; height: 50px; font-size: 26px; } .module-title { font-size: 18px; } .module-desc { font-size: 13px; } .footer-btn { padding: 10px 20px; font-size: 16px; } } /* Pattern-specific animations */ @keyframes dance { 0% { transform: scale(1) rotate(0deg); } 25% { transform: scale(1.1) rotate(5deg); } 50% { transform: scale(0.9) rotate(-5deg); } 75% { transform: scale(1.05) rotate(3deg); } 100% { transform: scale(1) rotate(0deg); } } @keyframes float { 0% { transform: translateY(0) translateX(0); } 25% { transform: translateY(-10px) translateX(5px); } 50% { transform: translateY(0) translateX(10px); } 75% { transform: translateY(10px) translateX(5px); } 100% { transform: translateY(0) translateX(0); } } @keyframes pulse { 0% { transform: scale(1); opacity: 0.7; } 50% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1); opacity: 0.7; } } @keyframes slideIn { 0% { transform: translateY(30px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } } @keyframes popShape { 0% { transform: scale(0); opacity: 0; } 70% { transform: scale(1.2); opacity: 0.8; } 100% { transform: scale(1); opacity: 0; } } .app-container { animation: slideIn 0.6s ease-out forwards; } .module-icon { animation: pulse 3s infinite; } .learning-module:nth-child(1) { animation-delay: 0.1s; } .learning-module:nth-child(2) { animation-delay: 0.2s; } .learning-module:nth-child(3) { animation-delay: 0.3s; } .learning-module:nth-child(4) { animation-delay: 0.4s; } </style> </head> <body> <div class="bg-pattern" id="bgPattern"></div> <div class="app-container"> <div class="app-header"> <h1 class="app-title">LearnySprouts</h1> <div class="app-nav"> <button class="nav-btn" id="homeBtn">🏠</button> <button class="nav-btn" id="settingsBtn">⚙️</button> </div> </div> <div class="main-content"> <div class="learning-module" id="alphabetModule"> <div class="module-bg" id="alphabetBg"></div> <div class="module-icon">🔤</div> <h3 class="module-title">Alphabet Adventure</h3> <p class="module-desc">Discover letters through fun games and create your own stories!</p> </div> <div class="learning-module" id="colorsModule"> <div class="module-bg" id="colorsBg"></div> <div class="module-icon colors-icon">🎨</div> <h3 class="module-title">Color Explorer</h3> <p class="module-desc">Mix and match colors to unlock the rainbow world of creativity!</p> </div> <div class="learning-module" id="shapesModule"> <div class="module-bg" id="shapesBg"></div> <div class="module-icon shapes-icon">📐</div> <h3 class="module-title">Shape Safari</h3> <p class="module-desc">Identify shapes in the wild and build amazing structures!</p> </div> <div class="learning-module" id="numbersModule"> <div class="module-bg" id="numbersBg"></div> <div class="module-icon numbers-icon">🔢</div> <h3 class="module-title">Number Ninjas</h3> <p class="module-desc">Count, add, and solve puzzles on your math adventure!</p> </div> </div> <div class="app-footer"> <button class="footer-btn" id="exploreBtn">Start Learning</button> </div> <div class="progress-dots"> <div class="progress-dot active"></div> <div class="progress-dot"></div> <div class="progress-dot"></div> <div class="progress-dot"></div> </div> </div> <div class="floating-shapes" id="floatingShapes"></div> <script> document.addEventListener('DOMContentLoaded', function() { // Create dynamic background pattern const bgPattern = document.getElementById('bgPattern'); const colors = ['#FF5252', '#FFEB3B', '#2196F3', '#4CAF50']; // Create stripes for (let i = 0; i < 10; i++) { const stripe = document.createElement('div'); stripe.classList.add('stripe'); const width = Math.random() * 150 + 50; const height = Math.random() * 10 + 5; const top = Math.random() * 100; const left = Math.random() * 100; const rotation = Math.random() * 180; const colorIndex = Math.floor(Math.random() * colors.length); stripe.style.width = `${width}px`; stripe.style.height = `${height}px`; stripe.style.top = `${top}%`; stripe.style.left = `${left}%`; stripe.style.transform = `rotate(${rotation}deg)`; stripe.style.backgroundColor = colors[colorIndex]; stripe.style.opacity = '0.2'; // Add animation stripe.style.animation = `float ${Math.random() * 8 + 6}s infinite ease-in-out`; stripe.style.animationDelay = `${Math.random() * 5}s`; bgPattern.appendChild(stripe); } // Create dots for (let i = 0; i < 30; i++) { const dot = document.createElement('div'); dot.classList.add('dot'); const size = Math.random() * 20 + 5; const top = Math.random() * 100; const left = Math.random() * 100; const colorIndex = Math.floor(Math.random() * colors.length); dot.style.width = `${size}px`; dot.style.height = `${size}px`; dot.style.top = `${top}%`; dot.style.left = `${left}%`; dot.style.backgroundColor = colors[colorIndex]; dot.style.opacity = '0.2'; // Add animation dot.style.animation = `pulse ${Math.random() * 4 + 3}s infinite ease-in-out`; dot.style.animationDelay = `${Math.random() * 5}s`; bgPattern.appendChild(dot); } // Create pattern backgrounds for each module createModuleBackground('alphabetBg', 'dots', '#FF5252'); createModuleBackground('colorsBg', 'stripes', '#FFEB3B'); createModuleBackground('shapesBg', 'dots', '#4CAF50'); createModuleBackground('numbersBg', 'stripes', '#2196F3'); // Handle module interactions const modules = document.querySelectorAll('.learning-module'); modules.forEach(module => { module.addEventListener('click', function() { createPopEffect(this); // Update progress dots const dots = document.querySelectorAll('.progress-dot'); dots.forEach(dot => dot.classList.remove('active')); // Get module index and activate corresponding dot const moduleIndex = Array.from(modules).indexOf(this); if (dots[moduleIndex]) { dots[moduleIndex].classList.add('active'); } }); // Add hover animations for floating shapes inside modules module.addEventListener('mouseenter', function() { spawnShapes(this.id, 5); }); }); // Button interactions const exploreBtn = document.getElementById('exploreBtn'); exploreBtn.addEventListener('click', function() { this.textContent = "Loading..."; setTimeout(() => { this.textContent = "Start Learning"; // Create a burst of shapes spawnShapes('floatingShapes', 20); }, 800); }); const homeBtn = document.getElementById('homeBtn'); homeBtn.addEventListener('click', function() { document.querySelector('.app-container').style.animation = 'none'; setTimeout(() => { document.querySelector('.app-container').style.animation = 'slideIn 0.6s ease-out forwards'; }, 10); }); const settingsBtn = document.getElementById('settingsBtn'); settingsBtn.addEventListener('click', function() { this.style.transform = 'rotate(180deg)'; setTimeout(() => { this.style.transform = 'rotate(0deg)'; }, 500); }); }); function createModuleBackground(elementId, type, color) { const bg = document.getElementById(elementId); if (type === 'dots') { for (let i = 0; i < 20; i++) { const dot = document.createElement('div'); dot.style.position = 'absolute'; const size = Math.random() * 15 + 5; const top = Math.random() * 100; const left = Math.random() * 100; dot.style.width = `${size}px`; dot.style.height = `${size}px`; dot.style.top = `${top}%`; dot.style.left = `${left}%`; dot.style.backgroundColor = color; dot.style.borderRadius = '50%'; dot.style.opacity = '0.4'; bg.appendChild(dot); } } else if (type === 'stripes') { for (let i = 0; i < 6; i++) { const stripe = document.createElement('div'); stripe.style.position = 'absolute'; const width = '120%'; const height = Math.random() * 10 + 5; const top = (i * 20) - 10; const left = '-10%'; const rotation = Math.random() * 10 - 5; stripe.style.width = width; stripe.style.height = `${height}px`; stripe.style.top = `${top}%`; stripe.style.left = left; stripe.style.transform = `rotate(${rotation}deg)`; stripe.style.backgroundColor = color; stripe.style.opacity = '0.4'; bg.appendChild(stripe); } } } function createPopEffect(element) { element.style.transform = 'scale(0.95)'; setTimeout(() => { element.style.transform = 'scale(1.03)'; setTimeout(() => { element.style.transform = 'scale(1)'; }, 150); }, 150); } function spawnShapes(containerId, count) { const container = document.getElementById(containerId) || document.getElementById('floatingShapes'); const shapes = ['circle', 'square', 'triangle']; const colors = ['#FF5252', '#FFEB3B', '#2196F3', '#4CAF50']; for (let i = 0; i < count; i++) { const shape = document.createElement('div'); shape.classList.add('shape'); const shapeType = shapes[Math.floor(Math.random() * shapes.length)]; const size = Math.random() * 20 + 10; const top = Math.random() * 100; const left = Math.random() * 100; const colorIndex = Math.floor(Math.random() * colors.length); shape.style.width = `${size}px`; shape.style.height = `${size}px`; shape.style.top = `${top}%`; shape.style.left = `${left}%`; shape.style.backgroundColor = colors[colorIndex]; if (shapeType === 'circle') { shape.style.borderRadius = '50%'; } else if (shapeType === 'triangle') { shape.style.width = '0'; shape.style.height = '0'; shape.style.borderLeft = `${size/2}px solid transparent`; shape.style.borderRight = `${size/2}px solid transparent`; shape.style.borderBottom = `${size}px solid ${colors[colorIndex]}`; shape.style.backgroundColor = 'transparent'; } // Animation shape.style.animation = `popShape ${Math.random() * 1 + 0.5}s forwards`; container.appendChild(shape); // Remove after animation completes setTimeout(() => { if (shape && shape.parentNode === container) { container.removeChild(shape); } }, 2000); } } </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>CyberShield Platform</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body { width: 100%; height: 100vh; background-color: #050A1C; overflow: hidden; display: flex; justify-content: center; align-items: center; color: #e0e0e0; } .container { width: 700px; height: 700px; position: relative; overflow: hidden; } .circuit-container { position: absolute; width: 100%; height: 100%; top: 0; left: 0; z-index: 1; } .circuit { position: absolute; background: linear-gradient(135deg, #0a1a3f 0%, #081331 100%); border-radius: 8px; box-shadow: 0 0 10px rgba(0, 150, 255, 0.2); overflow: hidden; } .circuit::before { content: ''; position: absolute; width: 100%; height: 1px; background: linear-gradient(90deg, transparent, #00c2ff, transparent); animation: circuit-line 3s infinite; } .circuit::after { content: ''; position: absolute; width: 1px; height: 100%; background: linear-gradient(0deg, transparent, #00c2ff, transparent); animation: circuit-line-vertical 4s infinite; } @keyframes circuit-line { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } } @keyframes circuit-line-vertical { 0% { transform: translateY(-100%); } 100% { transform: translateY(100%); } } .node { position: absolute; width: 6px; height: 6px; background-color: #00c2ff; border-radius: 50%; box-shadow: 0 0 8px #00c2ff, 0 0 12px #00c2ff; filter: blur(0.5px); z-index: 2; } .node.pulse { animation: node-pulse 2s infinite; } @keyframes node-pulse { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.5); opacity: 1; } } .content { position: relative; z-index: 5; width: 80%; max-width: 500px; margin: 0 auto; padding: 30px; background: rgba(8, 15, 40, 0.6); border-radius: 20px; backdrop-filter: blur(10px); border: 1px solid rgba(0, 194, 255, 0.2); box-shadow: 0 0 30px rgba(0, 150, 255, 0.1); } .logo { display: flex; align-items: center; margin-bottom: 30px; } .logo-icon { width: 40px; height: 40px; position: relative; margin-right: 15px; } .logo-shield { position: absolute; width: 100%; height: 100%; border-radius: 50%; background: linear-gradient(135deg, #050A1C 0%, #091538 100%); border: 2px solid #00c2ff; display: flex; justify-content: center; align-items: center; box-shadow: 0 0 15px rgba(0, 194, 255, 0.5); } .logo-lock { color: #00c2ff; font-size: 18px; } .logo-text { font-size: 24px; font-weight: 700; background: linear-gradient(90deg, #00c2ff, #00ffea); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: 1px; } h1 { font-size: 28px; margin-bottom: 15px; background: linear-gradient(90deg, #ffffff, #b3e0ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } p { line-height: 1.6; margin-bottom: 20px; color: #b3c6e0; } .stats { display: flex; justify-content: space-between; margin: 25px 0; } .stat-item { text-align: center; flex: 1; padding: 15px 10px; border-radius: 10px; background: rgba(10, 20, 50, 0.5); border: 1px solid rgba(0, 194, 255, 0.1); transition: all 0.3s ease; } .stat-item:hover { background: rgba(0, 194, 255, 0.1); transform: translateY(-5px); } .stat-item + .stat-item { margin-left: 15px; } .stat-value { font-size: 24px; font-weight: 700; color: #00c2ff; margin-bottom: 5px; } .stat-label { font-size: 12px; color: #8aa0c1; text-transform: uppercase; letter-spacing: 1px; } .cta-button { display: block; width: 100%; padding: 15px 0; margin-top: 20px; background: linear-gradient(90deg, #0066ff, #00c2ff); border: none; border-radius: 30px; color: white; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; } .cta-button:hover { box-shadow: 0 0 20px rgba(0, 194, 255, 0.5); } .cta-button:after { 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; } .cta-button:hover:after { left: 100%; } .feature-list { margin: 25px 0; } .feature-item { display: flex; align-items: center; margin-bottom: 15px; } .feature-icon { width: 30px; height: 30px; display: flex; justify-content: center; align-items: center; margin-right: 15px; border-radius: 50%; background: rgba(0, 194, 255, 0.1); color: #00c2ff; } .feature-text { flex: 1; } .hexagrid { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.4; pointer-events: none; } .threat-monitor { position: absolute; bottom: 20px; right: 20px; background: rgba(8, 15, 40, 0.7); border: 1px solid rgba(0, 194, 255, 0.2); border-radius: 10px; padding: 12px; z-index: 10; display: flex; align-items: center; box-shadow: 0 0 15px rgba(0, 150, 255, 0.1); backdrop-filter: blur(5px); } .threat-pulse { width: 15px; height: 15px; background-color: #ff3838; border-radius: 50%; margin-right: 10px; animation: threat-pulse 1.5s ease-in-out infinite; } @keyframes threat-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 56, 56, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(255, 56, 56, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 56, 56, 0); } } .threat-text { font-size: 14px; color: #e0e0e0; } .data-stream { position: absolute; top: 20px; left: 20px; z-index: 10; font-family: monospace; font-size: 12px; color: rgba(0, 194, 255, 0.7); width: 200px; height: 100px; overflow: hidden; padding: 10px; background: rgba(8, 15, 40, 0.3); border-radius: 5px; border: 1px solid rgba(0, 194, 255, 0.1); } .neon-glow { position: absolute; width: 100%; height: 100%; top: 0; left: 0; z-index: 0; background: radial-gradient(circle at center, rgba(0, 150, 255, 0.1) 0%, rgba(5, 10, 28, 0) 60%); pointer-events: none; } @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } } @media (max-width: 700px) { .content { width: 90%; padding: 20px; } .stats { flex-direction: column; } .stat-item + .stat-item { margin-left: 0; margin-top: 10px; } h1 { font-size: 24px; } .data-stream, .threat-monitor { display: none; } } </style> </head> <body> <div class="container"> <div class="neon-glow"></div> <div class="circuit-container" id="circuitContainer"></div> <svg class="hexagrid" preserveAspectRatio="none" viewBox="0 0 100 100" id="hexagrid"></svg> <div class="content"> <div class="logo"> <div class="logo-icon"> <div class="logo-shield"> <div class="logo-lock">⚷</div> </div> </div> <div class="logo-text">CyberShield</div> </div> <h1>Advanced Threat Protection</h1> <p>Real-time detection and response against sophisticated cyber threats with quantum-resistant encryption and AI-driven analysis.</p> <div class="stats"> <div class="stat-item"> <div class="stat-value" id="threatCount">8.5M</div> <div class="stat-label">Threats Blocked</div> </div> <div class="stat-item"> <div class="stat-value">99.8%</div> <div class="stat-label">Detection Rate</div> </div> <div class="stat-item"> <div class="stat-value" id="responseTime">2.8ms</div> <div class="stat-label">Response Time</div> </div> </div> <div class="feature-list"> <div class="feature-item"> <div class="feature-icon">⚡</div> <div class="feature-text">Zero-day vulnerability shielding with predictive analysis</div> </div> <div class="feature-item"> <div class="feature-icon">🔍</div> <div class="feature-text">Deep packet inspection with neural network processing</div> </div> <div class="feature-item"> <div class="feature-icon">🔄</div> <div class="feature-text">Autonomous threat containment and system restoration</div> </div> </div> <button class="cta-button">Activate Protection Layer</button> </div> <div class="threat-monitor"> <div class="threat-pulse"></div> <div class="threat-text">Active threat monitoring: <span id="threatStatus">Normal</span></div> </div> <div class="data-stream" id="dataStream"></div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Create circuits const circuitContainer = document.getElementById('circuitContainer'); const numCircuits = 15; for (let i = 0; i < numCircuits; i++) { const circuit = document.createElement('div'); circuit.className = 'circuit'; const width = Math.random() * 200 + 50; const height = Math.random() * 5 + 1; const top = Math.random() * 100; const left = Math.random() * 100; const rotation = Math.random() * 360; circuit.style.width = `${width}px`; circuit.style.height = `${height}px`; circuit.style.top = `${top}%`; circuit.style.left = `${left}%`; circuit.style.transform = `rotate(${rotation}deg)`; circuitContainer.appendChild(circuit); // Create vertical circuits if (i % 3 === 0) { const vCircuit = document.createElement('div'); vCircuit.className = 'circuit'; const vWidth = Math.random() * 5 + 1; const vHeight = Math.random() * 200 + 50; const vTop = Math.random() * 100; const vLeft = Math.random() * 100; vCircuit.style.width = `${vWidth}px`; vCircuit.style.height = `${vHeight}px`; vCircuit.style.top = `${vTop}%`; vCircuit.style.left = `${vLeft}%`; circuitContainer.appendChild(vCircuit); } } // Create nodes const numNodes = 30; for (let i = 0; i < numNodes; i++) { const node = document.createElement('div'); node.className = 'node'; if (i % 3 === 0) { node.classList.add('pulse'); } const size = Math.random() * 4 + 3; const top = Math.random() * 100; const left = Math.random() * 100; node.style.width = `${size}px`; node.style.height = `${size}px`; node.style.top = `${top}%`; node.style.left = `${left}%`; circuitContainer.appendChild(node); } // Create hexagonal grid pattern const hexagrid = document.getElementById('hexagrid'); for (let i = 0; i < 12; i++) { for (let j = 0; j < 12; j++) { const offsetX = j % 2 === 0 ? 4 : 0; const x = i * 8 + offsetX; const y = j * 7; const hex = document.createElementNS("http://www.w3.org/2000/svg", "path"); hex.setAttribute("d", `M${x+4},${y} L${x+7},${y+2} L${x+7},${y+5} L${x+4},${y+7} L${x+1},${y+5} L${x+1},${y+2} Z`); hex.setAttribute("fill", "none"); hex.setAttribute("stroke", "rgba(0, 194, 255, 0.15)"); hex.setAttribute("stroke-width", "0.2"); hexagrid.appendChild(hex); } } // Data stream effect const dataStream = document.getElementById('dataStream'); const securityLogs = [ "AUTH:VALIDATED user.id:84392", "SCAN:COMPLETE no threats found", "ACCESS:GRANTED to secure.endpoint", "PACKET:INSPECTED:SHA256 verified", "FIREWALL:BLOCK source:185.93.2.41", "ENCRYPTION:QUANTUM-KEY refreshed", "MALWARE:DETECTED:ISOLATING...", "PERIMETER:SECURE all ports monitored", "ZT-PROTOCOL:CHALLENGE:RESPONSE", "THREAT:NEUTRALIZED type:sql-injection", "SYSTEM:INTEGRITY verified" ]; function updateDataStream() { const randomLog = securityLogs[Math.floor(Math.random() * securityLogs.length)]; const timestamp = new Date().toLocaleTimeString('en-US', { hour12: false, hour: '2-digit', minute: '2-digit', second: '2-digit' }); dataStream.innerHTML += `<div>[${timestamp}] ${randomLog}</div>`; if (dataStream.children.length > 5) { dataStream.removeChild(dataStream.children[0]); } } setInterval(updateDataStream, 3000); updateDataStream(); // Threat statistics update const threatCount = document.getElementById('threatCount'); const responseTime = document.getElementById('responseTime'); const threatStatus = document.getElementById('threatStatus'); let currentThreats = 8.5; let currentResponse = 2.8; function updateStats() { // Update threat count currentThreats += (Math.random() * 0.1); threatCount.textContent = currentThreats.toFixed(1) + 'M'; // Update response time currentResponse = 2.5 + (Math.random() * 0.8); responseTime.textContent = currentResponse.toFixed(1) + 'ms'; // Update threat status randomly if (Math.random() > 0.85) { const statusOptions = ['Normal', 'Elevated', 'Scanning', 'Analyzing']; threatStatus.textContent = statusOptions[Math.floor(Math.random() * statusOptions.length)]; if (threatStatus.textContent === 'Elevated') { threatStatus.style.color = '#ff9900'; } else if (threatStatus.textContent === 'Normal') { threatStatus.style.color = '#00c2ff'; } else { threatStatus.style.color = '#e0e0e0'; } } } setInterval(updateStats, 5000); // Hover animations for interactive elements const ctaButton = document.querySelector('.cta-button'); ctaButton.addEventListener('click', function(e) { e.preventDefault(); // Create pulse effect const pulse = document.createElement('div'); pulse.style.position = 'absolute'; pulse.style.width = '100%'; pulse.style.height = '100%'; pulse.style.top = '0'; pulse.style.left = '0'; pulse.style.backgroundColor = 'rgba(0, 194, 255, 0.3)'; pulse.style.borderRadius = '30px'; pulse.style.animation = 'cta-pulse 0.8s ease-out'; pulse.style.zIndex = '0'; ctaButton.style.overflow = 'hidden'; ctaButton.appendChild(pulse); // Update button text const originalText = ctaButton.textContent; ctaButton.textContent = 'Protection Layer Active'; setTimeout(() => { pulse.remove(); // Create and animate nodes to show protection for (let i = 0; i < 15; i++) { setTimeout(() => { const protectNode = document.createElement('div'); protectNode.className = 'node pulse'; const size = Math.random() * 4 + 2; const top = Math.random() * 100; const left = Math.random() * 100; protectNode.style.width = `${size}px`; protectNode.style.height = `${size}px`; protectNode.style.top = `${top}%`; protectNode.style.left = `${left}%`; protectNode.style.opacity = '0'; protectNode.style.animation = 'node-pulse 2s infinite, node-appear 1s forwards'; circuitContainer.appendChild(protectNode); }, i * 200); } // Reset button text after a while setTimeout(() => { ctaButton.textContent = originalText; }, 4000); }, 800); }); // Add some custom CSS for additional animations const style = document.createElement('style'); style.textContent = ` @keyframes cta-pulse { 0% { transform: scale(0.3); opacity: 1; } 100% { transform: scale(1.2); opacity: 0; } } @keyframes node-appear { 0% { opacity: 0; } 100% { opacity: 1; } } .feature-item { transition: transform 0.3s ease; } .feature-item:hover { transform: translateX(8px); } .feature-item:hover .feature-icon { background: rgba(0, 194, 255, 0.3); box-shadow: 0 0 10px rgba(0, 194, 255, 0.5); } `; 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>Belle Époque Boutique</title> <style> :root { --pale-rose: #f8e1e6; --soft-lavender: #e5e1f8; --mint-green: #ddf0e2; --cream: #fdf6e3; --dusty-blue: #b6c8d9; --warm-taupe: #b1a39a; --dark-text: #4a3e3e; } * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: 'Cormorant Garamond', Georgia, serif; background-color: var(--cream); color: var(--dark-text); display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100vh; overflow: hidden; position: relative; } .pattern-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; z-index: 1; } .floral-pattern { width: 100%; height: 100%; position: absolute; opacity: 0.25; background-image: radial-gradient(var(--soft-lavender) 3px, transparent 3px), radial-gradient(var(--pale-rose) 3px, transparent 3px); background-size: 40px 40px; background-position: 0 0, 20px 20px; animation: floatPattern 60s linear infinite; } @keyframes floatPattern { 0% { transform: translate(0, 0) rotate(0deg); } 100% { transform: translate(20px, 20px) rotate(1deg); } } .floral-elements { position: absolute; width: 100%; height: 100%; z-index: 2; } .flower { position: absolute; width: 50px; height: 50px; opacity: 0.6; transform-origin: center; } .boutique-content { background-color: rgba(255, 255, 255, 0.85); border-radius: 12px; padding: 2.5rem; max-width: 600px; width: 90%; text-align: center; box-shadow: 0 8px 32px rgba(177, 163, 154, 0.2); position: relative; z-index: 10; overflow: hidden; animation: fadeIn 1.5s ease-out; } @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } .boutique-header { margin-bottom: 1.5rem; position: relative; } .boutique-header:after { content: ""; display: block; width: 60px; height: 2px; background-color: var(--warm-taupe); margin: 0.5rem auto 0; } h1 { font-size: 2.2rem; font-weight: normal; letter-spacing: 1px; margin-bottom: 0.5rem; color: var(--dark-text); } h2 { font-size: 1rem; font-weight: normal; font-style: italic; color: var(--warm-taupe); } p { line-height: 1.7; margin-bottom: 1.5rem; font-size: 1rem; } .product-showcase { display: flex; justify-content: space-between; margin: 2rem 0; overflow-x: hidden; } .product-item { flex: 0 0 31%; position: relative; overflow: hidden; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; cursor: pointer; } .product-item:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12); } .product-item img { width: 100%; height: 110px; object-fit: cover; display: block; transition: transform 0.6s ease; } .product-item:hover img { transform: scale(1.05); } .product-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(255, 255, 255, 0.9), transparent); padding: 0.75rem; text-align: center; transition: all 0.3s ease; } .product-name { font-size: 0.9rem; margin: 0; font-weight: normal; } .btn { display: inline-block; background-color: var(--pale-rose); color: var(--dark-text); padding: 10px 24px; border: none; border-radius: 30px; font-family: inherit; font-size: 0.9rem; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; box-shadow: 0 4px 15px rgba(177, 163, 154, 0.2); } .btn:hover { background-color: var(--soft-lavender); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(177, 163, 154, 0.3); } .btn:after { content: ''; position: absolute; width: 100%; height: 100%; top: 0; left: -100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); transition: 0.4s; } .btn:hover:after { left: 100%; } .decorative-corner { position: absolute; width: 80px; height: 80px; opacity: 0.5; z-index: 2; } .corner-top-left { top: 0; left: 0; transform: rotate(0deg); } .corner-top-right { top: 0; right: 0; transform: rotate(90deg); } .corner-bottom-left { bottom: 0; left: 0; transform: rotate(270deg); } .corner-bottom-right { bottom: 0; right: 0; transform: rotate(180deg); } .newsletter-form { position: relative; display: flex; margin-top: 1.5rem; } .newsletter-input { flex: 1; padding: 10px 16px; border: 1px solid var(--dusty-blue); border-radius: 30px; font-family: inherit; font-size: 0.9rem; background-color: rgba(255, 255, 255, 0.8); transition: all 0.3s ease; } .newsletter-input:focus { outline: none; border-color: var(--soft-lavender); box-shadow: 0 0 0 3px rgba(229, 225, 248, 0.3); } .newsletter-btn { background-color: var(--dusty-blue); color: white; border: none; border-radius: 0 30px 30px 0; padding: 0 20px; cursor: pointer; font-family: inherit; font-size: 0.9rem; margin-left: -20px; transition: all 0.3s ease; } .newsletter-btn:hover { background-color: var(--soft-lavender); } /* SVG styles */ .svg-flower { fill: var(--soft-lavender); transition: fill 0.3s ease; } .svg-flower:hover { fill: var(--pale-rose); } @media (max-width: 600px) { .boutique-content { padding: 1.5rem; width: 95%; } h1 { font-size: 1.8rem; } p { font-size: 0.9rem; } .product-showcase { flex-direction: column; gap: 15px; } .product-item { flex: 0 0 100%; } .newsletter-form { flex-direction: column; } .newsletter-input, .newsletter-btn { width: 100%; margin: 0; border-radius: 30px; } .newsletter-btn { margin-top: 10px; } } </style> </head> <body> <div class="pattern-container"> <div class="floral-pattern"></div> <div class="floral-elements" id="floral-elements"></div> </div> <div class="boutique-content"> <div class="decorative-corner corner-top-left"> <svg viewBox="0 0 100 100" width="100%" height="100%"> <path class="svg-flower" d="M30,30 Q50,10 70,30 Q90,50 70,70 Q50,90 30,70 Q10,50 30,30 Z" /> <path class="svg-flower" d="M40,40 Q50,30 60,40 Q70,50 60,60 Q50,70 40,60 Q30,50 40,40 Z" fill="var(--pale-rose)" /> <circle cx="50" cy="50" r="5" fill="var(--warm-taupe)" /> </svg> </div> <div class="decorative-corner corner-top-right"> <svg viewBox="0 0 100 100" width="100%" height="100%"> <path class="svg-flower" d="M30,30 Q50,10 70,30 Q90,50 70,70 Q50,90 30,70 Q10,50 30,30 Z" /> <path class="svg-flower" d="M40,40 Q50,30 60,40 Q70,50 60,60 Q50,70 40,60 Q30,50 40,40 Z" fill="var(--pale-rose)" /> <circle cx="50" cy="50" r="5" fill="var(--warm-taupe)" /> </svg> </div> <div class="decorative-corner corner-bottom-left"> <svg viewBox="0 0 100 100" width="100%" height="100%"> <path class="svg-flower" d="M30,30 Q50,10 70,30 Q90,50 70,70 Q50,90 30,70 Q10,50 30,30 Z" /> <path class="svg-flower" d="M40,40 Q50,30 60,40 Q70,50 60,60 Q50,70 40,60 Q30,50 40,40 Z" fill="var(--pale-rose)" /> <circle cx="50" cy="50" r="5" fill="var(--warm-taupe)" /> </svg> </div> <div class="decorative-corner corner-bottom-right"> <svg viewBox="0 0 100 100" width="100%" height="100%"> <path class="svg-flower" d="M30,30 Q50,10 70,30 Q90,50 70,70 Q50,90 30,70 Q10,50 30,30 Z" /> <path class="svg-flower" d="M40,40 Q50,30 60,40 Q70,50 60,60 Q50,70 40,60 Q30,50 40,40 Z" fill="var(--pale-rose)" /> <circle cx="50" cy="50" r="5" fill="var(--warm-taupe)" /> </svg> </div> <div class="boutique-header"> <h1>Belle Époque</h1> <h2>Handcrafted treasures with European charm</h2> </div> <p>Step into a world of nostalgic European craftsmanship. Each item in our collection is carefully selected to bring the delicate artistry of bygone eras into contemporary spaces—porcelain vases adorned with hand-painted botanicals, embroidered linens, and delicate bijoux that carry stories from Paris to Provence.</p> <div class="product-showcase"> <div class="product-item"> <img src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHJlY3Qgd2lkdGg9IjEwMCIgaGVpZ2h0PSIxMDAiIGZpbGw9IiNmOGUxZTYiLz4KICA8Y2lyY2xlIGN4PSI1MCIgY3k9IjUwIiByPSIzMCIgZmlsbD0iI2U1ZTFmOCIvPgogIDxwYXRoIGQ9Ik01MCwzMCBRNjAsNDUgNzAsNTAgUTYwLDU1IDUwLDcwIFE0MCw1NSAzMCw1MCBRNDAsNDUgNTAsMzAgWiIgZmlsbD0iI2ZkZjZlMyIvPgogIDxjaXJjbGUgY3g9IjUwIiBjeT0iNTAiIHI9IjUiIGZpbGw9IiNiMWEzOWEiLz4KPC9zdmc+" alt="Hand-painted Vase"> <div class="product-overlay"> <p class="product-name">Hand-painted Vase</p> </div> </div> <div class="product-item"> <img src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHJlY3Qgd2lkdGg9IjEwMCIgaGVpZ2h0PSIxMDAiIGZpbGw9IiNkZGYwZTIiLz4KICA8cmVjdCB4PSIyMCIgeT0iMjAiIHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjYjZjOGQ5IiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBkPSJNMzAsMzUgUTQwLDI1IDUwLDM1IFE2MCw0NSA3MCwzNSBNMzAsNTAgUTQwLDQwIDUwLDUwIFE2MCw2MCA3MCw1MCBNMzAsNjUgUTQwLDU1IDUwLDY1IFE2MCw3NSA3MCw2NSIgc3Ryb2tlPSIjYjFhMzlhIiBzdHJva2Utd2lkdGg9IjIiIGZpbGw9Im5vbmUiLz4KPC9zdmc+" alt="Embroidered Linen"> <div class="product-overlay"> <p class="product-name">Embroidered Linen</p> </div> </div> <div class="product-item"> <img src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHJlY3Qgd2lkdGg9IjEwMCIgaGVpZ2h0PSIxMDAiIGZpbGw9IiNlNWUxZjgiLz4KICA8Y2lyY2xlIGN4PSI1MCIgY3k9IjQwIiByPSIxMCIgZmlsbD0iI2Y4ZTFlNiIvPgogIDxjaXJjbGUgY3g9IjMwIiBjeT0iNjAiIHI9IjgiIGZpbGw9IiNmOGUxZTYiLz4KICA8Y2lyY2xlIGN4PSI3MCIgY3k9IjYwIiByPSI4IiBmaWxsPSIjZjhlMWU2Ii8+CiAgPHBhdGggZD0iTTMwLDYwIFE1MCw4MCA3MCw2MCIgc3Ryb2tlPSIjYjFhMzlhIiBzdHJva2Utd2lkdGg9IjIiIGZpbGw9Im5vbmUiLz4KICA8cGF0aCBkPSJNNTAsNDAgUTUwLDUwIDMwLDYwIE01MCw0MCBRNTAsNTAgNzAsNjAiIHN0cm9rZT0iI2IxYTM5YSIgc3Ryb2tlLXdpZHRoPSIyIiBmaWxsPSJub25lIi8+Cjwvc3ZnPg==" alt="Vintage Bijoux"> <div class="product-overlay"> <p class="product-name">Vintage Bijoux</p> </div> </div> </div> <p>Our curated collection brings the timeless beauty of European floral traditions to your everyday life. Each piece tells a story of botanical heritage, imbued with the subtle grace of provincial charm.</p> <button class="btn" id="explore-btn">Explore Collection</button> <div class="newsletter-form"> <input type="email" class="newsletter-input" placeholder="Enter email for our botanical gazette..." aria-label="Email address"> <button class="newsletter-btn" id="subscribe-btn">Subscribe</button> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Create floral elements dynamically const floralContainer = document.getElementById('floral-elements'); const flowerTypes = [ // Rose `<svg viewBox="0 0 50 50" class="svg-flower"><path d="M25,10 Q30,20 40,25 Q30,30 25,40 Q20,30 10,25 Q20,20 25,10 Z" /><circle cx="25" cy="25" r="5" fill="var(--warm-taupe)" /></svg>`, // Daisy `<svg viewBox="0 0 50 50" class="svg-flower"><path d="M20,15 Q25,10 30,15 Q35,10 40,15 Q45,20 40,25 Q45,30 40,35 Q35,40 30,35 Q25,40 20,35 Q15,30 20,25 Q15,20 20,15 Z" /><circle cx="30" cy="25" r="5" fill="var(--warm-taupe)" /></svg>`, // Small flower `<svg viewBox="0 0 50 50" class="svg-flower"><circle cx="25" cy="15" r="5" /><circle cx="35" cy="25" r="5" /><circle cx="25" cy="35" r="5" /><circle cx="15" cy="25" r="5" /><circle cx="25" cy="25" r="5" fill="var(--warm-taupe)" /></svg>` ]; // Place flowers randomly for (let i = 0; i < 20; i++) { const flower = document.createElement('div'); flower.className = 'flower'; flower.style.left = `${Math.random() * 100}%`; flower.style.top = `${Math.random() * 100}%`; flower.style.transform = `rotate(${Math.random() * 360}deg) scale(${0.5 + Math.random() * 0.7})`; flower.innerHTML = flowerTypes[Math.floor(Math.random() * flowerTypes.length)]; // Random color const colors = ['var(--pale-rose)', 'var(--soft-lavender)', 'var(--mint-green)']; flower.querySelector('path, circle:not(:last-child)').setAttribute('fill', colors[Math.floor(Math.random() * colors.length)]); floralContainer.appendChild(flower); } // Make flowers sway gently document.querySelectorAll('.flower').forEach(flower => { const duration = 10 + Math.random() * 20; const delay = Math.random() * 5; flower.style.animation = `floatFlower ${duration}s ease-in-out ${delay}s infinite alternate`; }); // Add flower animation const styleSheet = document.styleSheets[0]; styleSheet.insertRule(` @keyframes floatFlower { 0% { transform: rotate(${Math.random() * 10 - 5}deg) scale(${0.9 + Math.random() * 0.2}); } 100% { transform: rotate(${Math.random() * 10 - 5}deg) scale(${0.9 + Math.random() * 0.2}); } } `, styleSheet.cssRules.length); // Explore button animation const exploreBtn = document.getElementById('explore-btn'); exploreBtn.addEventListener('click', function() { this.textContent = 'Coming Soon...'; this.style.backgroundColor = 'var(--dusty-blue)'; this.style.color = 'white'; setTimeout(() => { this.textContent = 'Explore Collection'; this.style.backgroundColor = 'var(--pale-rose)'; this.style.color = 'var(--dark-text)'; }, 2000); }); // Subscribe button animation const subscribeBtn = document.getElementById('subscribe-btn'); const newsletterInput = document.querySelector('.newsletter-input'); subscribeBtn.addEventListener('click', function() { if (newsletterInput.value.trim() !== '') { this.textContent = 'Subscribed!'; newsletterInput.value = ''; newsletterInput.placeholder = 'Thank you for joining our community'; setTimeout(() => { this.textContent = 'Subscribe'; newsletterInput.placeholder = 'Enter email for our botanical gazette...'; }, 3000); } else { newsletterInput.placeholder = 'Please enter your email'; newsletterInput.focus(); } }); // Prevent form submission document.querySelector('.newsletter-form').addEventListener('submit', function(e) { e.preventDefault(); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>FlowFit - Dynamic Fitness Experience</title> <style> /* Reset & Base Styles */ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background-color: #0c0c14; color: #fff; overflow-x: hidden; height: 100%; width: 100%; position: relative; } .container { max-width: 700px; height: 700px; margin: 0 auto; position: relative; overflow: hidden; display: flex; flex-direction: column; } /* Fluid Background Elements */ .fluid-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; overflow: hidden; } .fluid-element { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.6; z-index: -1; transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1); } .fluid-element.one { width: 300px; height: 300px; background: linear-gradient(135deg, #ff3e00, #ff8300); top: -100px; left: -100px; animation: floatOne 15s infinite alternate ease-in-out; } .fluid-element.two { width: 400px; height: 400px; background: linear-gradient(135deg, #4158D0, #00c6ff); bottom: -150px; right: -150px; animation: floatTwo 18s infinite alternate ease-in-out; } .fluid-element.three { width: 250px; height: 250px; background: linear-gradient(135deg, #43e97b, #38f9d7); top: 50%; left: 60%; animation: floatThree 12s infinite alternate ease-in-out; } @keyframes floatOne { 0% { transform: translate(0, 0) rotate(0deg); } 100% { transform: translate(50px, 30px) rotate(10deg); } } @keyframes floatTwo { 0% { transform: translate(0, 0) rotate(0deg); } 100% { transform: translate(-40px, -60px) rotate(-15deg); } } @keyframes floatThree { 0% { transform: translate(0, 0) rotate(0deg); } 100% { transform: translate(-30px, 50px) rotate(8deg); } } /* Motion Lines */ .motion-lines { position: absolute; width: 100%; height: 100%; z-index: 0; pointer-events: none; } .motion-line { position: absolute; height: 2px; background: rgba(255, 255, 255, 0.2); transform-origin: left center; border-radius: 2px; } /* Content Styles */ .content { position: relative; z-index: 2; padding: 2rem; height: 100%; display: flex; flex-direction: column; justify-content: center; } header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; position: absolute; top: 0; left: 0; width: 100%; padding: 1.5rem 2rem; z-index: 10; } .logo { font-weight: 800; font-size: 1.5rem; color: #fff; position: relative; text-transform: uppercase; letter-spacing: 1px; } .logo::after { content: ''; position: absolute; bottom: -3px; left: 0; width: 100%; height: 3px; background: linear-gradient(90deg, #ff3e00, #4158D0); transform-origin: right; transform: scaleX(0); transition: transform 0.3s ease; } .logo:hover::after { transform-origin: left; transform: scaleX(1); } nav ul { display: flex; list-style: none; gap: 1.5rem; } nav li a { color: rgba(255, 255, 255, 0.75); text-decoration: none; font-weight: 500; font-size: 0.9rem; transition: color 0.3s, transform 0.3s; padding: 0.3rem 0; position: relative; display: inline-block; } nav li a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: linear-gradient(90deg, #4158D0, #43e97b); transform: scaleX(0); transform-origin: right; transition: transform 0.3s ease; } nav li a:hover { color: #fff; } nav li a:hover::after { transform: scaleX(1); transform-origin: left; } /* Hero Section */ .hero { text-align: left; max-width: 90%; margin-top: 3rem; } .hero h1 { font-size: 3rem; font-weight: 800; line-height: 1.1; margin-bottom: 1.5rem; position: relative; background: linear-gradient(90deg, #fff, #a2f0ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .hero h1 span { position: relative; display: inline-block; } .hero h1 span::after { content: ''; position: absolute; height: 10px; width: 100%; background: linear-gradient(90deg, rgba(65, 88, 208, 0.5), rgba(255, 62, 0, 0.5)); bottom: -5px; left: 0; filter: blur(8px); z-index: -1; } .hero p { font-size: 1.1rem; line-height: 1.6; color: rgba(255, 255, 255, 0.7); margin-bottom: 2rem; max-width: 90%; } /* Interactive Card Grid */ .performance-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; margin-bottom: 2.5rem; } .metric-card { background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px; padding: 1.2rem; transition: transform 0.3s, box-shadow 0.3s; cursor: pointer; position: relative; overflow: hidden; } .metric-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent); transform: translateX(-100%); transition: transform 0.6s; } .metric-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); border-color: rgba(255, 255, 255, 0.2); } .metric-card:hover::before { transform: translateX(100%); } .metric-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: #fff; font-weight: 600; } .metric-card .value { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.8rem; background: linear-gradient(90deg, #ff3e00, #ff8300); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .metric-card .progress { width: 100%; height: 6px; background: rgba(255, 255, 255, 0.1); border-radius: 3px; overflow: hidden; position: relative; } .metric-card .progress-bar { height: 100%; border-radius: 3px; transition: width 1s cubic-bezier(0.22, 1, 0.36, 1); } .metric-card:nth-child(1) .progress-bar { background: linear-gradient(90deg, #ff3e00, #ff8300); width: 85%; } .metric-card:nth-child(2) .progress-bar { background: linear-gradient(90deg, #4158D0, #00c6ff); width: 70%; } .metric-card:nth-child(3) .progress-bar { background: linear-gradient(90deg, #43e97b, #38f9d7); width: 92%; } .metric-card:nth-child(4) .progress-bar { background: linear-gradient(90deg, #f093fb, #f5576c); width: 65%; } /* CTA Button */ .cta-button { display: inline-block; background: linear-gradient(90deg, #4158D0, #43e97b); color: white; font-weight: 600; padding: 0.9rem 2rem; border-radius: 50px; text-decoration: none; transition: transform 0.3s, box-shadow 0.3s; position: relative; overflow: hidden; z-index: 1; border: none; cursor: pointer; font-size: 1rem; letter-spacing: 0.5px; box-shadow: 0 4px 15px rgba(65, 88, 208, 0.4); } .cta-button::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(90deg, #43e97b, #4158D0); z-index: -1; transition: opacity 0.3s ease; opacity: 0; } .cta-button:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(65, 88, 208, 0.6); } .cta-button:hover::before { opacity: 1; } .cta-button:active { transform: translateY(0); } /* Responsive Styles */ @media (max-width: 600px) { .hero h1 { font-size: 2.2rem; } .hero p { font-size: 1rem; } .performance-metrics { grid-template-columns: 1fr; } nav ul { gap: 1rem; } .fluid-element.one { width: 200px; height: 200px; } .fluid-element.two { width: 250px; height: 250px; } .fluid-element.three { width: 150px; height: 150px; } } /* Pulsating Circle Animation */ .pulse-circle { position: absolute; top: 70%; left: 30%; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, rgba(67, 233, 123, 0.2) 0%, rgba(65, 88, 208, 0) 70%); z-index: -1; animation: pulse 4s infinite; transform-origin: center; } @keyframes pulse { 0% { transform: scale(0.8); opacity: 0.5; } 50% { transform: scale(1.2); opacity: 0.8; } 100% { transform: scale(0.8); opacity: 0.5; } } </style> </head> <body> <div class="container"> <div class="fluid-bg"> <div class="fluid-element one"></div> <div class="fluid-element two"></div> <div class="fluid-element three"></div> </div> <div class="motion-lines" id="motionLines"></div> <div class="pulse-circle"></div> <header> <div class="logo">FlowFit</div> <nav> <ul> <li><a href="#" class="nav-link">Programs</a></li> <li><a href="#" class="nav-link">Metrics</a></li> <li><a href="#" class="nav-link">Profile</a></li> </ul> </nav> </header> <div class="content"> <div class="hero"> <h1>Elevate Your <span>Fitness</span> Journey</h1> <p>Track your progress with dynamic metrics that adapt to your training intensity. Our fluid analytics help you maintain momentum and break through plateaus.</p> <div class="performance-metrics"> <div class="metric-card"> <h3>Daily Activity</h3> <div class="value">85%</div> <div class="progress"> <div class="progress-bar"></div> </div> </div> <div class="metric-card"> <h3>Recovery Rate</h3> <div class="value">70%</div> <div class="progress"> <div class="progress-bar"></div> </div> </div> <div class="metric-card"> <h3>Workout Consistency</h3> <div class="value">92%</div> <div class="progress"> <div class="progress-bar"></div> </div> </div> <div class="metric-card"> <h3>Nutrition Balance</h3> <div class="value">65%</div> <div class="progress"> <div class="progress-bar"></div> </div> </div> </div> <button class="cta-button">Start Performance Tracking</button> </div> </div> </div> <script> // Create dynamic motion lines function createMotionLines() { const container = document.getElementById('motionLines'); const numberOfLines = 15; for (let i = 0; i < numberOfLines; i++) { const line = document.createElement('div'); line.classList.add('motion-line'); // Randomize line properties const length = Math.random() * 200 + 50; const thickness = Math.random() * 1 + 1; const xPos = Math.random() * 100; const yPos = Math.random() * 100; const rotation = Math.random() * 180; const delay = Math.random() * 5; const duration = Math.random() * 3 + 2; const opacity = Math.random() * 0.3 + 0.1; // Set line styles line.style.width = `${length}px`; line.style.height = `${thickness}px`; line.style.left = `${xPos}%`; line.style.top = `${yPos}%`; line.style.transform = `rotate(${rotation}deg)`; line.style.opacity = opacity; // Add animation line.style.animation = `floatLine ${duration}s infinite alternate ease-in-out ${delay}s`; // Add keyframes for this specific line const keyframes = ` @keyframes floatLine { 0% { transform: rotate(${rotation}deg) translateX(0); opacity: ${opacity}; } 100% { transform: rotate(${rotation + 10}deg) translateX(${Math.random() * 30}px); opacity: ${opacity - 0.05}; } } `; const styleSheet = document.createElement('style'); styleSheet.textContent = keyframes; document.head.appendChild(styleSheet); container.appendChild(line); } } // Motion tracking for fluid elements function initFluidMotion() { const container = document.querySelector('.container'); const fluidElements = document.querySelectorAll('.fluid-element'); container.addEventListener('mousemove', (e) => { const x = e.clientX / container.offsetWidth; const y = e.clientY / container.offsetHeight; fluidElements.forEach((element, index) => { const factor = (index + 1) * 20; const offsetX = (x - 0.5) * factor; const offsetY = (y - 0.5) * factor; element.style.transform = `translate(${offsetX}px, ${offsetY}px)`; }); }); container.addEventListener('mouseleave', () => { fluidElements.forEach((element) => { element.style.transform = 'translate(0, 0)'; }); }); } // Initialize metrics animation function initMetricsAnimation() { const metricCards = document.querySelectorAll('.metric-card'); metricCards.forEach((card) => { card.addEventListener('mouseenter', () => { const progressBar = card.querySelector('.progress-bar'); const currentWidth = progressBar.style.width; // Temporarily reduce and then animate back to create pulse effect progressBar.style.width = '0%'; setTimeout(() => { progressBar.style.width = currentWidth; }, 50); }); }); } // Initialize interactivity when document is ready document.addEventListener('DOMContentLoaded', () => { createMotionLines(); initFluidMotion(); initMetricsAnimation(); // Add click handler for CTA button (no actual form submission) document.querySelector('.cta-button').addEventListener('click', (e) => { e.preventDefault(); const button = e.target; // Visual feedback for the button click button.textContent = "Tracking Initialized!"; button.style.background = "linear-gradient(90deg, #43e97b, #43e97b)"; setTimeout(() => { button.textContent = "Start Performance Tracking"; button.style.background = ""; }, 2000); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Modular Mosaic Gallery</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Playfair Display', 'Helvetica Neue', sans-serif; color: #333; background-color: #f9f9f9; height: 100vh; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; } .container { position: relative; width: 100%; max-width: 700px; height: 700px; overflow: hidden; } .mosaic-grid { position: absolute; width: 100%; height: 100%; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); gap: 2px; padding: 2px; z-index: 1; } .mosaic-tile { position: relative; overflow: hidden; cursor: pointer; transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); transform-origin: center center; border-radius: 2px; } .mosaic-tile::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--tile-color); mix-blend-mode: multiply; opacity: 0.8; transition: all 0.3s ease; } .mosaic-tile:hover::before { opacity: 0.3; mix-blend-mode: overlay; } .mosaic-tile:hover { transform: scale(1.05); z-index: 10; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); } .texture { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; mix-blend-mode: overlay; opacity: 0.8; transition: all 0.3s ease; } .watercolor { background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+CiAgPGZpbHRlciBpZD0ibm9pc2UiPgogICAgPGZlVHVyYnVsZW5jZSB0eXBlPSJmcmFjdGFsTm9pc2UiIGJhc2VGcmVxdWVuY3k9IjAuMDUiIG51bU9jdGF2ZXM9IjIiIHN0aXRjaFRpbGVzPSJzdGl0Y2giLz4KICAgIDxmZURpZmZ1c2VMaWdodGluZyBsaWdodGluZy1jb2xvcj0iIzY2OTllNiIgc3VyZmFjZVNjYWxlPSIxMCI+CiAgICAgIDxmZURpc3RhbnRMaWdodCBhenVtdXRoPSIyNTAiIGVsZXZhdGlvbj0iMjUiLz4KICAgIDwvZmVEaWZmdXNlTGlnaHRpbmc+CiAgPC9maWx0ZXI+CiAgPHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsdGVyPSJ1cmwoI25vaXNlKSIvPgo8L3N2Zz4='); } .brushstroke { background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+CiAgPGZpbHRlciBpZD0iYnJ1c2giPgogICAgPGZlVHVyYnVsZW5jZSB0eXBlPSJ0dXJidWxlbmNlIiBiYXNlRnJlcXVlbmN5PSIwLjA5IiBudW1PY3RhdmVzPSIzIiBzdGl0Y2hUaWxlcz0ic3RpdGNoIiByZXN1bHQ9Im5vaXNlIi8+CiAgICA8ZmVEaXNwbGFjZW1lbnRNYXAgaW49Im5vaXNlIiBzY2FsZT0iMjAiLz4KICA8L2ZpbHRlcj4KICA8cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWx0ZXI9InVybCgjYnJ1c2gpIi8+Cjwvc3ZnPg=='); } .canvas { background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+CiAgPGZpbHRlciBpZD0iZ3JhaW4iPgogICAgPGZlVHVyYnVsZW5jZSB0eXBlPSJmcmFjdGFsTm9pc2UiIGJhc2VGcmVxdWVuY3k9IjAuNzUiIG51bU9jdGF2ZXM9IjMiIHN0aXRjaFRpbGVzPSJzdGl0Y2giIHJlc3VsdD0ibm9pc2UiLz4KICAgIDxmZUNvbG9yTWF0cml4IHR5cGU9Im1hdHJpeCIgdmFsdWVzPSIwIDAgMCAwIDAgIDAgMCAwIDAgMCAgMCAwIDAgMCAwICAwIDAgMCAwLjA1IDAiLz4KICA8L2ZpbHRlcj4KICA8cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWx0ZXI9InVybCgjZ3JhaW4pIi8+Cjwvc3ZnPg=='); } .ink { background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+CiAgPGZpbHRlciBpZD0iaW5rIj4KICAgIDxmZVR1cmJ1bGVuY2UgdHlwZT0iZnJhY3RhbE5vaXNlIiBiYXNlRnJlcXVlbmN5PSIwLjEiIG51bU9jdGF2ZXM9IjUiIHN0aXRjaFRpbGVzPSJzdGl0Y2giLz4KICAgIDxmZUNvbG9yTWF0cml4IHR5cGU9InNhdHVyYXRlIiB2YWx1ZXM9IjEwIi8+CiAgPC9maWx0ZXI+CiAgPHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsdGVyPSJ1cmwoI2luaykiLz4KPC9zdmc+'); } .overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 2rem; background: rgba(255, 255, 255, 0.9); z-index: 20; opacity: 0; transform: translateY(20px); transition: all 0.5s cubic-bezier(0.17, 0.67, 0.83, 0.67); pointer-events: none; } .overlay.visible { opacity: 1; transform: translateY(0); pointer-events: all; } .gallery-title { position: relative; font-size: 3rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 1rem; text-align: center; background-image: linear-gradient(90deg, #d53369, #daae51, #2a5298); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; transition-delay: 0.2s; } .gallery-subtitle { font-size: 1.2rem; line-height: 1.5; text-align: center; max-width: 80%; margin-bottom: 2rem; opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; transition-delay: 0.3s; } .explore-btn { background: none; border: 2px solid #333; font-family: inherit; font-size: 1rem; padding: 0.8rem 1.5rem; cursor: pointer; position: relative; overflow: hidden; transition: all 0.3s ease; opacity: 0; transform: translateY(20px); transition-delay: 0.4s; } .explore-btn::before { content: ''; position: absolute; top: 0; left: 0; width: 0; height: 100%; background-color: #333; z-index: -1; transition: width 0.3s ease; } .explore-btn:hover { color: white; } .explore-btn:hover::before { width: 100%; } .overlay.visible .gallery-title, .overlay.visible .gallery-subtitle, .overlay.visible .explore-btn { opacity: 1; transform: translateY(0); } .cursor { position: fixed; width: 30px; height: 30px; border-radius: 50%; background-color: rgba(255, 255, 255, 0.4); mix-blend-mode: difference; pointer-events: none; transform: translate(-50%, -50%); z-index: 9999; opacity: 0; transition: opacity 0.3s ease, transform 0.1s ease; } @media (max-width: 600px) { .mosaic-grid { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(8, 1fr); } .gallery-title { font-size: 2rem; } .gallery-subtitle { font-size: 1rem; } } </style> </head> <body> <div class="cursor"></div> <div class="container"> <div class="mosaic-grid" id="mosaicGrid"></div> <div class="overlay" id="overlay"> <h1 class="gallery-title">Chromatic Confluence</h1> <p class="gallery-subtitle">A digital canvas showcasing the fluidity of artistic expression—where brushstrokes meet pixels and tradition embraces innovation.</p> <button class="explore-btn" id="exploreBtn">Explore the Mosaic</button> </div> </div> <script> document.addEventListener('DOMContentLoaded', () => { const mosaicGrid = document.getElementById('mosaicGrid'); const overlay = document.getElementById('overlay'); const exploreBtn = document.getElementById('exploreBtn'); const cursor = document.querySelector('.cursor'); // Array of artistic color palettes const colorPalettes = [ // Impressionist palette ['#f7e9c3', '#d2c5a0', '#5a6e5c', '#2b424d', '#a7754d'], // Abstract expressionist palette ['#d94f70', '#f2d0a4', '#1e847f', '#5fc9cd', '#802121'], // Pop art palette ['#0a7e8c', '#f26430', '#ffcb18', '#086375', '#ffa630'], // Surrealist palette ['#581c87', '#9333ea', '#d8b4fe', '#e879f9', '#0c4a6e'], // Contemporary palette ['#eef2f7', '#d0cdd7', '#54426b', '#134074', '#0a369d'] ]; // Texture types const textureTypes = ['watercolor', 'brushstroke', 'canvas', 'ink']; // Create mosaic tiles with animation delay for (let i = 0; i < 64; i++) { const tile = document.createElement('div'); const texture = document.createElement('div'); // Randomly select a color palette and then a color from it const randomPalette = colorPalettes[Math.floor(Math.random() * colorPalettes.length)]; const tileColor = randomPalette[Math.floor(Math.random() * randomPalette.length)]; // Randomly select a texture const textureType = textureTypes[Math.floor(Math.random() * textureTypes.length)]; tile.classList.add('mosaic-tile'); tile.style.setProperty('--tile-color', tileColor); // Set animation properties with slight randomness const animDelay = Math.random() * 2; const animDuration = 1 + Math.random() * 2; tile.style.opacity = '0'; tile.style.transform = 'scale(0.8)'; tile.style.transition = `opacity 0.5s ease ${animDelay}s, transform 0.5s ease ${animDelay}s`; texture.classList.add('texture', textureType); tile.appendChild(texture); mosaicGrid.appendChild(tile); // Animate the tiles appearance setTimeout(() => { tile.style.opacity = '1'; tile.style.transform = 'scale(1)'; }, 100); // Interactive animation on click tile.addEventListener('click', () => { tile.style.transform = 'scale(1.15) rotate(5deg)'; setTimeout(() => { tile.style.transform = ''; }, 300); }); } // Show the overlay initially setTimeout(() => { overlay.classList.add('visible'); }, 1000); // Handle explore button click exploreBtn.addEventListener('click', () => { overlay.classList.remove('visible'); // Add floating animation to random tiles periodically setInterval(() => { const randomTile = mosaicGrid.children[Math.floor(Math.random() * mosaicGrid.children.length)]; randomTile.style.transform = 'translateY(-5px)'; setTimeout(() => { randomTile.style.transform = ''; }, 1000); }, 2000); }); // Custom cursor effect document.addEventListener('mousemove', (e) => { cursor.style.opacity = '1'; cursor.style.left = `${e.clientX}px`; cursor.style.top = `${e.clientY}px`; // Scale effect on mouse move cursor.style.transform = 'translate(-50%, -50%) scale(1)'; clearTimeout(window.cursorTimeout); window.cursorTimeout = setTimeout(() => { cursor.style.transform = 'translate(-50%, -50%) scale(0.8)'; }, 100); }); document.addEventListener('mousedown', () => { cursor.style.transform = 'translate(-50%, -50%) scale(0.8)'; cursor.style.opacity = '0.8'; }); document.addEventListener('mouseup', () => { cursor.style.transform = 'translate(-50%, -50%) scale(1)'; cursor.style.opacity = '1'; }); document.addEventListener('mouseleave', () => { cursor.style.opacity = '0'; }); // Double click to toggle overlay document.addEventListener('dblclick', () => { overlay.classList.toggle('visible'); }); // Handle responsive behavior const handleResize = () => { if (window.innerWidth <= 600) { // Simplify animations on small screens document.querySelectorAll('.mosaic-tile').forEach(tile => { tile.style.transition = 'all 0.3s ease'; }); } }; window.addEventListener('resize', handleResize); handleResize(); // Call once on init }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>PulseWave Music Stream</title> <style> :root { --neon-pink: #ff2a75; --neon-blue: #00eeff; --neon-purple: #ba01ff; --dark-bg: #080818; --medium-dark: #101028; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; } body { background-color: var(--dark-bg); color: white; height: 700px; width: 100%; overflow-x: hidden; position: relative; } .container { max-width: 700px; height: 700px; margin: 0 auto; padding: 1.5rem; position: relative; overflow: hidden; } .wave-backdrop { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.3; background: linear-gradient(180deg, var(--dark-bg) 0%, var(--medium-dark) 100%); overflow: hidden; } .wave { position: absolute; width: 200%; height: 40px; background: var(--neon-blue); border-radius: 50%; filter: blur(10px); animation: wave-animation 8s infinite linear; opacity: 0.2; transform-origin: center; } .wave:nth-child(1) { bottom: 10%; animation-delay: 0s; background: var(--neon-pink); } .wave:nth-child(2) { bottom: 20%; animation-delay: -2s; animation-duration: 10s; background: var(--neon-blue); } .wave:nth-child(3) { bottom: 30%; animation-delay: -4s; animation-duration: 7s; background: var(--neon-purple); } .wave:nth-child(4) { bottom: 40%; animation-delay: -2.5s; animation-duration: 9s; background: var(--neon-blue); } @keyframes wave-animation { 0% { transform: translateX(-50%) scaleY(1); } 25% { transform: translateX(-30%) scaleY(0.8); } 50% { transform: translateX(-10%) scaleY(1.2); } 75% { transform: translateX(10%) scaleY(0.9); } 100% { transform: translateX(30%) scaleY(1); } } .content { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; } .header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; } .logo { font-size: 1.8rem; font-weight: 700; background: linear-gradient(90deg, var(--neon-pink), var(--neon-blue)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; display: flex; align-items: center; gap: 0.5rem; } .logo-icon { display: inline-block; width: 28px; height: 28px; position: relative; } .logo-circle { position: absolute; background: var(--neon-pink); border-radius: 50%; animation: pulse 1.5s infinite alternate; } .logo-circle:nth-child(1) { width: 28px; height: 28px; opacity: 0.2; } .logo-circle:nth-child(2) { width: 20px; height: 20px; top: 4px; left: 4px; opacity: 0.4; } .logo-circle:nth-child(3) { width: 12px; height: 12px; top: 8px; left: 8px; opacity: 0.7; } @keyframes pulse { 0% { transform: scale(1); background: var(--neon-pink); } 100% { transform: scale(1.1); background: var(--neon-blue); } } .search-bar { display: flex; align-items: center; background-color: rgba(255, 255, 255, 0.1); border-radius: 50px; padding: 0.5rem 1rem; transition: all 0.3s ease; border: 1px solid transparent; } .search-bar:hover, .search-bar:focus-within { background-color: rgba(255, 255, 255, 0.15); border-color: var(--neon-pink); box-shadow: 0 0 15px rgba(255, 42, 117, 0.3); } .search-bar input { background: transparent; border: none; outline: none; color: white; width: 150px; padding: 0.5rem; font-size: 0.9rem; } .search-icon { color: white; opacity: 0.7; } .player-section { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; margin-top: 1rem; } .visualizer { width: 100%; height: 120px; display: flex; align-items: center; justify-content: center; gap: 4px; margin-bottom: 2rem; } .bar { width: 6px; background: var(--neon-blue); border-radius: 6px; transition: height 0.1s ease; } .album-art { width: 220px; height: 220px; border-radius: 10px; background: var(--medium-dark); position: relative; overflow: hidden; margin-bottom: 1.5rem; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); transition: transform 0.3s ease; } .album-art:hover { transform: scale(1.05); } .album-art img { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; } .album-overlay { position: absolute; bottom: 0; left: 0; width: 100%; padding: 1rem; background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent); transform: translateY(100%); transition: transform 0.3s ease; } .album-art:hover .album-overlay { transform: translateY(0); } .track-info { text-align: center; margin-bottom: 1.5rem; } .track-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; background: linear-gradient(90deg, var(--neon-pink), var(--neon-blue)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; } .track-artist { font-size: 1rem; color: rgba(255, 255, 255, 0.7); margin-bottom: 0.5rem; } .player-controls { display: flex; align-items: center; justify-content: center; gap: 1.5rem; margin-bottom: 1.5rem; } .control-btn { background: transparent; border: none; cursor: pointer; color: white; opacity: 0.8; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; } .control-btn:hover { opacity: 1; transform: scale(1.1); } .play-btn { width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple)); opacity: 1; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 20px rgba(186, 1, 255, 0.5); } .progress-container { width: 100%; max-width: 320px; margin-bottom: 1rem; } .progress-bar { width: 100%; height: 4px; background-color: rgba(255, 255, 255, 0.1); border-radius: 10px; overflow: hidden; margin-bottom: 0.5rem; position: relative; cursor: pointer; } .progress { width: 35%; height: 100%; background: linear-gradient(90deg, var(--neon-pink), var(--neon-blue)); border-radius: 10px; position: relative; } .progress::after { content: ''; position: absolute; right: -4px; top: 50%; transform: translateY(-50%); width: 8px; height: 8px; border-radius: 50%; background: white; box-shadow: 0 0 10px rgba(255, 255, 255, 0.8); opacity: 0; transition: opacity 0.2s; } .progress-bar:hover .progress::after { opacity: 1; } .time-info { display: flex; justify-content: space-between; font-size: 0.8rem; color: rgba(255, 255, 255, 0.6); } .now-playing { position: absolute; bottom: 1.5rem; left: 1.5rem; right: 1.5rem; display: flex; align-items: center; padding: 0.8rem; background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(10px); border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.1); } .mini-album { width: 50px; height: 50px; border-radius: 5px; margin-right: 1rem; background: var(--medium-dark); overflow: hidden; } .mini-album img { width: 100%; height: 100%; object-fit: cover; } .mini-info { flex: 1; } .mini-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.2rem; } .mini-artist { font-size: 0.8rem; color: rgba(255, 255, 255, 0.6); } .mini-controls { display: flex; align-items: center; gap: 1rem; } .mini-btn { background: transparent; border: none; cursor: pointer; color: white; opacity: 0.7; transition: all 0.2s ease; } .mini-btn:hover { opacity: 1; } @media (max-width: 480px) { .header { flex-direction: column; align-items: flex-start; gap: 1rem; } .search-bar { width: 100%; } .album-art { width: 180px; height: 180px; } .player-controls { gap: 1rem; } .progress-container { max-width: 280px; } .now-playing { padding: 0.5rem; } .mini-album { width: 40px; height: 40px; } } </style> </head> <body> <div class="container"> <div class="wave-backdrop"> <div class="wave"></div> <div class="wave"></div> <div class="wave"></div> <div class="wave"></div> </div> <div class="content"> <header class="header"> <div class="logo"> <div class="logo-icon"> <div class="logo-circle"></div> <div class="logo-circle"></div> <div class="logo-circle"></div> </div> PulseWave </div> <div class="search-bar"> <div class="search-icon"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M21 21L16.65 16.65M19 11C19 15.4183 15.4183 19 11 19C6.58172 19 3 15.4183 3 11C3 6.58172 6.58172 3 11 3C15.4183 3 19 6.58172 19 11Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </div> <input type="text" placeholder="Search music"> </div> </header> <div class="player-section"> <div class="visualizer" id="visualizer"> <!-- Bars will be dynamically generated --> </div> <div class="album-art"> <img src="https://images.unsplash.com/photo-1614613535308-eb5fbd3d2c17?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Mnx8ZWxlY3Ryb25pYyUyMG11c2ljfGVufDB8fDB8fHww&auto=format&fit=crop&w=800&q=80" alt="Album artwork"> <div class="album-overlay"> <span>From the album "Signal Paths"</span> </div> </div> <div class="track-info"> <h2 class="track-title">Neon Frequencies</h2> <p class="track-artist">Synth Collective</p> </div> <div class="player-controls"> <button class="control-btn"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M19 6L5 6M5 6L10 11M5 6L10 1M5 18H19M19 18L14 13M19 18L14 23" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </button> <button class="control-btn"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M19 5L5 12L19 19V5Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </button> <button class="control-btn play-btn"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M8 5V19L19 12L8 5Z" fill="white" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </button> <button class="control-btn"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M5 5L19 12L5 19V5Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </button> <button class="control-btn"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M8 5.00001C8 3.34315 9.34315 2 11 2C12.6569 2 14 3.34315 14 5.00001V12C14 13.6569 12.6569 15 11 15C9.34315 15 8 13.6569 8 12V5.00001Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M17 8C18.6569 8 20 9.34315 20 11V12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12V11C4 9.34315 5.34315 8 7 8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </button> </div> <div class="progress-container"> <div class="progress-bar"> <div class="progress" id="progress"></div> </div> <div class="time-info"> <span>1:45</span> <span>4:32</span> </div> </div> </div> <div class="now-playing"> <div class="mini-album"> <img src="https://images.unsplash.com/photo-1516280440614-37939bbacd81?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NHx8ZWxlY3Ryb25pYyUyMG11c2ljfGVufDB8fDB8fHww&auto=format&fit=crop&w=500&q=60" alt="Next track"> </div> <div class="mini-info"> <div class="mini-title">Ambient Circuits</div> <div class="mini-artist">Echo Chamber</div> </div> <div class="mini-controls"> <button class="mini-btn"> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M21 8.25C21 5.76472 18.9013 3.75 16.3125 3.75C14.3769 3.75 12.7153 4.87628 12 6.48342C11.2847 4.87628 9.62312 3.75 7.6875 3.75C5.09867 3.75 3 5.76472 3 8.25C3 15.4706 12 20.25 12 20.25C12 20.25 21 15.4706 21 8.25Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg> </button> <button class="mini-btn"> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M5 12H5.01M12 12H12.01M19 12H19.01M6 12C6 12.5523 5.55228 13 5 13C4.44772 13 4 12.5523 4 12C4 11.4477 4.44772 11 5 11C5.55228 11 6 11.4477 6 12ZM13 12C13 12.5523 12.5523 13 12 13C11.4477 13 11 12.5523 11 12C11 11.4477 11.4477 11 12 11C12.5523 11 13 11.4477 13 12ZM20 12C20 12.5523 19.5523 13 19 13C18.4477 13 18 12.5523 18 12C18 11.4477 18.4477 11 19 11C19.5523 11 20 11.4477 20 12Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </button> </div> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Create audio visualizer bars const visualizer = document.getElementById('visualizer'); const barCount = 32; for (let i = 0; i < barCount; i++) { const bar = document.createElement('div'); bar.classList.add('bar'); visualizer.appendChild(bar); } // Animate the audio visualizer function animateVisualizer() { const bars = document.querySelectorAll('.bar'); bars.forEach(bar => { // Generate random heights based on a sine wave pattern for more natural movement const time = Date.now() / 1000; const index = Array.from(bars).indexOf(bar); const frequency = 1 + index * 0.05; // Calculate a value between 0 and 1 using sine const sineValue = (Math.sin(time * frequency + index) + 1) / 2; // Add some randomness for a more natural look const randomFactor = Math.random() * 0.2; const combinedValue = sineValue * (0.8 + randomFactor); // Scale to get the height (between 10px and 100px) const height = 10 + combinedValue * 90; // Apply height and a color gradient based on height bar.style.height = `${height}px`; // Color gradient calculation (pink to blue) const hue = 280 + (height / 100) * 60; // 280 (pink) to 340 (blue) const saturation = 90 + (height / 100) * 10; const lightness = 50 + (height / 100) * 10; bar.style.background = `hsl(${hue}, ${saturation}%, ${lightness}%)`; bar.style.boxShadow = `0 0 ${height / 10}px hsl(${hue}, ${saturation}%, ${lightness}%)`; }); requestAnimationFrame(animateVisualizer); } animateVisualizer(); // Add progress bar interaction const progressBar = document.querySelector('.progress-bar'); const progress = document.getElementById('progress'); progressBar.addEventListener('click', function(e) { const rect = this.getBoundingClientRect(); const clickPosition = e.clientX - rect.left; const progressPercentage = (clickPosition / rect.width) * 100; progress.style.width = `${progressPercentage}%`; }); // Album hover effect const albumArt = document.querySelector('.album-art'); const playBtn = document.querySelector('.play-btn'); albumArt.addEventListener('mousemove', function(e) { const rect = this.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; // Calculate rotation based on mouse position const rotateY = (x / rect.width - 0.5) * 10; const rotateX = (y / rect.height - 0.5) * -10; this.style.transform = `perspective(1000px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) scale(1.05)`; }); albumArt.addEventListener('mouseleave', function() { this.style.transform = 'perspective(1000px) rotateX(0) rotateY(0) scale(1)'; }); // Play button animation playBtn.addEventListener('click', function() { this.classList.toggle('playing'); if (this.classList.contains('playing')) { this.innerHTML = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M10 4H6V20H10V4Z" fill="white" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M18 4H14V20H18V4Z" fill="white" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg>`; } else { this.innerHTML = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M8 5V19L19 12L8 5Z" fill="white" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg>`; } }); // Add ripple effect to buttons const buttons = document.querySelectorAll('.control-btn, .mini-btn'); buttons.forEach(button => { button.addEventListener('click', function(e) { const rect = this.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; const circle = document.createElement('span'); circle.style.position = 'absolute'; circle.style.backgroundColor = 'rgba(255, 255, 255, 0.3)'; circle.style.borderRadius = '50%'; circle.style.width = '100px'; circle.style.height = '100px'; circle.style.transform = 'translate(-50%, -50%) scale(0)'; circle.style.left = `${x}px`; circle.style.top = `${y}px`; circle.style.animation = 'ripple 0.6s linear'; this.style.overflow = 'hidden'; this.style.position = 'relative'; this.appendChild(circle); setTimeout(() => { circle.remove(); }, 600); }); }); // Add the ripple animation const style = document.createElement('style'); style.textContent = ` @keyframes ripple { to { transform: translate(-50%, -50%) scale(4); opacity: 0; } } `; document.head.appendChild(style); }); </script> </body> </html>