@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
overflow-x: hidden;
}
.fluid-menu {
position: fixed;
top: 30px;
left: 50%;
transform: translateX(-50%);
z-index: 1000;
width: 90%;
max-width: 900px;
}
.menu-container {
position: relative;
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(20px);
border-radius: 50px;
padding: 15px 30px;
display: flex;
justify-content: space-between;
align-items: center;
border: 1px solid rgba(255, 255, 255, 0.2);
box-shadow:
0 8px 32px rgba(0, 0, 0, 0.1),
inset 0 1px 0 rgba(255, 255, 255, 0.2);
overflow: hidden;
}
.gradient-bg {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(
45deg,
rgba(255, 0, 150, 0.3) 0%,
rgba(0, 204, 255, 0.3) 25%,
rgba(255, 204, 0, 0.3) 50%,
rgba(255, 0, 150, 0.3) 75%,
rgba(0, 204, 255, 0.3) 100%
);
background-size: 400% 400%;
animation: gradient-flow 8s ease-in-out infinite;
border-radius: 50px;
}
.logo-text {
font-size: 1.8rem;
font-weight: 700;
background: linear-gradient(45deg, #ff0096, #00ccff, #ffcc00);
background-size: 200% 200%;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
animation: text-gradient 3s ease-in-out infinite;
position: relative;
z-index: 2;
}
.logo-wave {
position: absolute;
bottom: -5px;
left: 0;
right: 0;
height: 3px;
background: linear-gradient(90deg, #ff0096, #00ccff, #ffcc00);
border-radius: 2px;
animation: wave-flow 2s ease-in-out infinite;
}
.menu-items {
display: flex;
list-style: none;
gap: 20px;
margin: 0;
padding: 0;
}
.menu-link {
position: relative;
color: white;
text-decoration: none;
font-weight: 500;
padding: 12px 20px;
border-radius: 25px;
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
overflow: hidden;
display: block;
}
.link-text {
position: relative;
z-index: 2;
transition: all 0.3s ease;
}
.fluid-effect {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(
135deg,
rgba(255, 0, 150, 0.6) 0%,
rgba(0, 204, 255, 0.6) 50%,
rgba(255, 204, 0, 0.6) 100%
);
border-radius: 25px;
transform: scale(0) rotate(45deg);
transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
opacity: 0;
}
.menu-link:hover {
transform: translateY(-2px);
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}
.menu-link:hover .fluid-effect {
transform: scale(1) rotate(0deg);
opacity: 1;
}
.menu-link:hover .link-text {
color: white;
text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
.morphing-blob {
position: absolute;
width: 100px;
height: 100px;
background: linear-gradient(
45deg,
rgba(255, 0, 150, 0.4),
rgba(0, 204, 255, 0.4),
rgba(255, 204, 0, 0.4)
);
border-radius: 50%;
filter: blur(20px);
animation: blob-morph 6s ease-in-out infinite;
pointer-events: none;
z-index: 1;
}
@keyframes gradient-flow {
0%, 100% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
}
@keyframes text-gradient {
0%, 100% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
}
@keyframes wave-flow {
0%, 100% {
transform: scaleX(1) translateX(0);
}
50% {
transform: scaleX(1.2) translateX(10px);
}
}
@keyframes blob-morph {
0%, 100% {
transform: translate(-20px, -20px) scale(1) rotate(0deg);
border-radius: 50%;
}
25% {
transform: translate(calc(100vw - 120px), -10px) scale(1.2) rotate(90deg);
border-radius: 30% 70% 70% 30%;
}
50% {
transform: translate(calc(100vw - 100px), calc(100vh - 120px)) scale(0.8) rotate(180deg);
border-radius: 70% 30% 30% 70%;
}
75% {
transform: translate(-10px, calc(100vh - 110px)) scale(1.1) rotate(270deg);
border-radius: 40% 60% 60% 40%;
}
}
@media (max-width: 768px) {
.menu-container {
flex-direction: column;
gap: 15px;
padding: 20px;
border-radius: 30px;
}
.menu-items {
gap: 10px;
flex-wrap: wrap;
justify-content: center;
}
.menu-link {
padding: 10px 16px;
font-size: 0.9rem;
}
.logo-text {
font-size: 1.5rem;
}
.fluid-menu {
width: 95%;
}
.morphing-blob {
width: 60px;
height: 60px;
}
}
document.addEventListener('DOMContentLoaded', function() {
const menuLinks = document.querySelectorAll('.menu-link');
const menuContainer = document.querySelector('.menu-container');
const morphingBlob = document.querySelector('.morphing-blob');
// Enhanced fluid effects
menuLinks.forEach(link => {
link.addEventListener('mouseenter', function() {
// Create ripple effect
createRipple(this);
// Add fluid distortion
this.style.filter = 'blur(0.5px)';
setTimeout(() => {
this.style.filter = 'none';
}, 200);
});
link.addEventListener('mouseleave', function() {
this.style.filter = 'none';
});
// Add click effect
link.addEventListener('click', function(e) {
e.preventDefault();
// Create liquid splash
createLiquidSplash(this);
});
});
// Create ripple effect
function createRipple(element) {
const ripple = document.createElement('div');
const rect = element.getBoundingClientRect();
ripple.style.cssText = `
position: absolute;
border-radius: 50%;
background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, transparent 70%);
transform: scale(0);
animation: ripple-expand 0.6s ease-out;
pointer-events: none;
z-index: 1;
width: 100px;
height: 100px;
left: 50%;
top: 50%;
margin-left: -50px;
margin-top: -50px;
`;
element.appendChild(ripple);
setTimeout(() => {
if (ripple.parentNode) {
ripple.parentNode.removeChild(ripple);
}
}, 600);
}
// Create liquid splash effect
function createLiquidSplash(element) {
const splash = document.createElement('div');
splash.style.cssText = `
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(circle,
rgba(255, 0, 150, 0.8) 0%,
rgba(0, 204, 255, 0.6) 30%,
rgba(255, 204, 0, 0.4) 60%,
transparent 100%);
border-radius: 25px;
animation: liquid-splash 0.8s ease-out;
pointer-events: none;
z-index: 1;
`;
element.appendChild(splash);
setTimeout(() => {
if (splash.parentNode) {
splash.parentNode.removeChild(splash);
}
}, 800);
}
// Add CSS animations
const style = document.createElement('style');
style.textContent = `
@keyframes ripple-expand {
0% {
transform: scale(0);
opacity: 1;
}
100% {
transform: scale(2);
opacity: 0;
}
}
@keyframes liquid-splash {
0% {
transform: scale(0.5) rotate(0deg);
opacity: 0;
}
50% {
transform: scale(1.2) rotate(180deg);
opacity: 1;
}
100% {
transform: scale(1.5) rotate(360deg);
opacity: 0;
}
}
@keyframes fluid-wave {
0%, 100% {
transform: translateY(0) scaleY(1);
}
50% {
transform: translateY(-5px) scaleY(1.1);
}
}
`;
document.head.appendChild(style);
// Interactive blob following mouse
let mouseX = 0;
let mouseY = 0;
let blobX = 0;
let blobY = 0;
document.addEventListener('mousemove', function(e) {
mouseX = e.clientX;
mouseY = e.clientY;
});
function animateBlob() {
const dx = mouseX - blobX;
const dy = mouseY - blobY;
blobX += dx * 0.1;
blobY += dy * 0.1;
if (morphingBlob) {
morphingBlob.style.transform = `translate(${blobX - 50}px, ${blobY - 50}px)`;
}
requestAnimationFrame(animateBlob);
}
animateBlob();
// Gradient color cycling
let colorPhase = 0;
function cycleColors() {
colorPhase += 0.02;
const gradientBg = document.querySelector('.gradient-bg');
if (gradientBg) {
const hue1 = (colorPhase * 60) % 360;
const hue2 = (colorPhase * 60 + 120) % 360;
const hue3 = (colorPhase * 60 + 240) % 360;
gradientBg.style.background = `
linear-gradient(
45deg,
hsla(${hue1}, 70%, 60%, 0.3) 0%,
hsla(${hue2}, 70%, 60%, 0.3) 50%,
hsla(${hue3}, 70%, 60%, 0.3) 100%
)
`;
}
requestAnimationFrame(cycleColors);
}
cycleColors();
// Fluid menu item animations
function addFluidMotion() {
menuLinks.forEach((link, index) => {
const delay = index * 100;
setTimeout(() => {
link.style.animation = `fluid-wave 3s ease-in-out infinite`;
link.style.animationDelay = `${index * 0.2}s`;
}, delay);
});
}
addFluidMotion();
// Parallax effect for background
window.addEventListener('scroll', function() {
const scrolled = window.pageYOffset;
const parallax = document.querySelector('.gradient-bg');
if (parallax) {
const speed = scrolled * 0.5;
parallax.style.transform = `translateY(${speed}px)`;
}
});
});