* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Arial', sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
overflow-x: hidden;
}
.background {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
}
.shape {
position: absolute;
border-radius: 50%;
filter: blur(40px);
animation: float 6s ease-in-out infinite;
}
.shape-1 {
width: 200px;
height: 200px;
background: linear-gradient(45deg, #ff6b6b, #ee5a24);
top: 20%;
left: 10%;
animation-delay: 0s;
}
.shape-2 {
width: 150px;
height: 150px;
background: linear-gradient(45deg, #4834d4, #686de0);
top: 60%;
right: 20%;
animation-delay: 2s;
}
.shape-3 {
width: 180px;
height: 180px;
background: linear-gradient(45deg, #00d2d3, #54a0ff);
bottom: 20%;
left: 50%;
animation-delay: 4s;
}
.glassmorphism-menu {
position: fixed;
top: 20px;
left: 50%;
transform: translateX(-50%);
z-index: 1000;
width: 90%;
max-width: 800px;
}
.menu-container {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 20px;
padding: 15px 30px;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease;
}
.menu-container:hover {
background: rgba(255, 255, 255, 0.15);
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}
.logo-text {
font-size: 1.8rem;
font-weight: bold;
color: white;
text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
letter-spacing: 2px;
}
.menu-items {
display: flex;
list-style: none;
gap: 30px;
margin: 0;
padding: 0;
}
.menu-link {
color: white;
text-decoration: none;
font-weight: 500;
padding: 10px 20px;
border-radius: 15px;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.menu-link::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: left 0.5s ease;
}
.menu-link:hover {
background: rgba(255, 255, 255, 0.2);
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.menu-link:hover::before {
left: 100%;
}
.menu-toggle {
display: none;
flex-direction: column;
cursor: pointer;
gap: 4px;
}
.menu-toggle span {
width: 25px;
height: 3px;
background: white;
border-radius: 2px;
transition: all 0.3s ease;
}
@keyframes float {
0%, 100% {
transform: translateY(0px) rotate(0deg);
}
33% {
transform: translateY(-20px) rotate(120deg);
}
66% {
transform: translateY(20px) rotate(240deg);
}
}
@media (max-width: 768px) {
.menu-items {
display: none;
position: absolute;
top: 100%;
left: 0;
right: 0;
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(20px);
border-radius: 15px;
margin-top: 10px;
padding: 20px;
flex-direction: column;
gap: 15px;
}
.menu-items.active {
display: flex;
}
.menu-toggle {
display: flex;
}
.menu-toggle.active span:nth-child(1) {
transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) {
opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
transform: rotate(-45deg) translate(7px, -6px);
}
.glassmorphism-menu {
width: 95%;
}
.menu-container {
padding: 15px 20px;
position: relative;
}
}
document.addEventListener('DOMContentLoaded', function() {
const menuToggle = document.querySelector('.menu-toggle');
const menuItems = document.querySelector('.menu-items');
const menuLinks = document.querySelectorAll('.menu-link');
// Mobile menu toggle
menuToggle.addEventListener('click', function() {
this.classList.toggle('active');
menuItems.classList.toggle('active');
});
// Close mobile menu when clicking on a link
menuLinks.forEach(link => {
link.addEventListener('click', function() {
menuToggle.classList.remove('active');
menuItems.classList.remove('active');
});
});
// Enhanced hover effects
menuLinks.forEach(link => {
link.addEventListener('mouseenter', function() {
this.style.textShadow = '0 0 10px rgba(255, 255, 255, 0.8)';
});
link.addEventListener('mouseleave', function() {
this.style.textShadow = 'none';
});
});
// Parallax effect for menu
window.addEventListener('scroll', function() {
const scrolled = window.pageYOffset;
const menu = document.querySelector('.glassmorphism-menu');
if (menu) {
menu.style.transform = `translateX(-50%) translateY(${scrolled * 0.1}px)`;
}
});
// Dynamic background shapes
function createFloatingShape() {
const shape = document.createElement('div');
shape.className = 'shape';
const size = Math.random() * 100 + 50;
const colors = [
'linear-gradient(45deg, #ff6b6b, #ee5a24)',
'linear-gradient(45deg, #4834d4, #686de0)',
'linear-gradient(45deg, #00d2d3, #54a0ff)',
'linear-gradient(45deg, #5f27cd, #a55eea)',
'linear-gradient(45deg, #00d2d3, #01a3a4)'
];
shape.style.width = size + 'px';
shape.style.height = size + 'px';
shape.style.background = colors[Math.floor(Math.random() * colors.length)];
shape.style.position = 'absolute';
shape.style.borderRadius = '50%';
shape.style.filter = 'blur(40px)';
shape.style.left = Math.random() * 100 + '%';
shape.style.top = Math.random() * 100 + '%';
shape.style.animation = `float ${Math.random() * 4 + 4}s ease-in-out infinite`;
shape.style.animationDelay = Math.random() * 2 + 's';
document.querySelector('.background').appendChild(shape);
// Remove shape after animation
setTimeout(() => {
if (shape.parentNode) {
shape.parentNode.removeChild(shape);
}
}, 8000);
}
// Create new shapes periodically
setInterval(createFloatingShape, 3000);
});