@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@300;400;500;600;700&display=swap');
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Noto Sans', sans-serif;
  background: linear-gradient(135deg, #f5f5f0 0%, #e8e8e0 100%);
  min-height: 100vh;
  overflow-x: hidden;
}
.origami-menu {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: 90%;
  max-width: 1100px;
}
.menu-container {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.1),
    0 1px 8px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
}
.menu-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, 
    transparent 30%, 
    rgba(255, 255, 255, 0.1) 50%, 
    transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
.menu-container:hover::before {
  transform: translateX(100%);
}
.paper-texture {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.03) 0%, transparent 50%);
  border-radius: 20px;
  pointer-events: none;
}
.origami-logo {
  position: relative;
}
.logo-fold {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}
.logo-fold:hover {
  transform: rotateY(15deg) rotateX(5deg);
}
.logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2c3e50;
  letter-spacing: 3px;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.fold-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(52, 73, 94, 0.3), 
    transparent);
  transform: translateY(-50%);
  animation: fold-shimmer 3s ease-in-out infinite;
}
.menu-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
}
.menu-items {
  display: flex;
  list-style: none;
  gap: 15px;
  margin: 0;
  padding: 0;
}
.menu-item {
  position: relative;
}
.menu-link {
  position: relative;
  display: block;
  color: #34495e;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 15px 25px;
  border-radius: 12px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 1000px;
}
.paper-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 12px;
  transition: all 0.4s ease;
  pointer-events: none;
}
.layer-1 {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  transform: translateZ(0px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.layer-2 {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  transform: translateZ(-2px) translateY(2px);
  opacity: 0;
}
.layer-3 {
  background: linear-gradient(135deg, #ced4da 0%, #adb5bd 100%);
  transform: translateZ(-4px) translateY(4px);
  opacity: 0;
}
.link-text {
  position: relative;
  z-index: 10;
  transition: all 0.3s ease;
}
.fold-indicator {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(45deg, 
    rgba(52, 152, 219, 0.1), 
    rgba(155, 89, 182, 0.1));
  transition: width 0.4s ease;
  border-radius: 0 12px 12px 0;
}
.fold-indicator::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, 
    transparent, 
    rgba(52, 152, 219, 0.5), 
    transparent);
  transform: skewX(-15deg);
}
.menu-link:hover {
  color: #2c3e50;
  transform: translateY(-3px) rotateX(5deg);
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.15),
    0 3px 10px rgba(0, 0, 0, 0.1);
}
.menu-link:hover .layer-1 {
  transform: translateZ(2px) rotateX(-5deg);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}
.menu-link:hover .layer-2 {
  opacity: 0.7;
  transform: translateZ(0px) translateY(1px) rotateX(-3deg);
}
.menu-link:hover .layer-3 {
  opacity: 0.4;
  transform: translateZ(-2px) translateY(2px) rotateX(-1deg);
}
.menu-link:hover .fold-indicator {
  width: 30px;
}
.menu-link:hover .link-text {
  transform: translateZ(5px);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.origami-bird {
  position: relative;
  width: 60px;
  height: 40px;
}
.bird-body {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: bird-float 4s ease-in-out infinite;
}
.wing {
  position: absolute;
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  border-radius: 50% 10% 50% 10%;
  transform-origin: bottom center;
  animation: wing-flap 2s ease-in-out infinite;
}
.wing-left {
  top: 5px;
  left: 10px;
  width: 20px;
  height: 25px;
  transform: rotateZ(-20deg);
  animation-delay: 0s;
}
.wing-right {
  top: 5px;
  right: 10px;
  width: 20px;
  height: 25px;
  transform: rotateZ(20deg) scaleX(-1);
  animation-delay: 0.1s;
}
.bird-head {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 15px;
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}
.bird-head::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 3px;
  background: #f39c12;
  border-radius: 0 0 50% 50%;
}
@keyframes fold-shimmer {
  0%, 100% {
    opacity: 0.3;
    transform: translateY(-50%) scaleX(0.8);
  }
  50% {
    opacity: 0.8;
    transform: translateY(-50%) scaleX(1.2);
  }
}
@keyframes bird-float {
  0%, 100% {
    transform: translateY(0px) rotateZ(0deg);
  }
  25% {
    transform: translateY(-3px) rotateZ(1deg);
  }
  75% {
    transform: translateY(3px) rotateZ(-1deg);
  }
}
@keyframes wing-flap {
  0%, 100% {
    transform: rotateX(0deg);
  }
  50% {
    transform: rotateX(-30deg);
  }
}
@media (max-width: 768px) {
  .origami-menu {
    width: 95%;
  }
  
  .menu-container {
    flex-direction: column;
    gap: 20px;
    padding: 25px 20px;
  }
  
  .menu-items {
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .menu-link {
    padding: 12px 20px;
    font-size: 0.9rem;
  }
  
  .logo-text {
    font-size: 1.5rem;
    letter-spacing: 2px;
  }
  
  .origami-bird {
    width: 50px;
    height: 35px;
  }
}
@media (max-width: 480px) {
  .menu-items {
    flex-direction: column;
    width: 100%;
  }
  
  .menu-link {
    text-align: center;
    width: 100%;
  }
  
  .menu-container {
    padding: 20px 15px;
  }
}
     document.addEventListener('DOMContentLoaded', function() {
  const menuLinks = document.querySelectorAll('.menu-link');
  const menuContainer = document.querySelector('.menu-container');
  const origamiBird = document.querySelector('.origami-bird');
  const logoFold = document.querySelector('.logo-fold');
  
  // Enhanced paper folding effects
  menuLinks.forEach((link, index) => {
    link.addEventListener('mouseenter', function() {
      // Create paper fold animation
      createPaperFold(this);
      
      // Stagger other menu items
      menuLinks.forEach((otherLink, otherIndex) => {
        if (otherLink !== this) {
          const delay = Math.abs(otherIndex - index) * 50;
          setTimeout(() => {
            otherLink.style.transform = 'translateY(2px) rotateX(2deg)';
            otherLink.style.filter = 'brightness(0.95)';
          }, delay);
        }
      });
    });
    
    link.addEventListener('mouseleave', function() {
      // Reset other menu items
      menuLinks.forEach(otherLink => {
        otherLink.style.transform = '';
        otherLink.style.filter = '';
      });
    });
    
    // Click effect with origami unfolding
    link.addEventListener('click', function(e) {
      e.preventDefault();
      createOrigamiUnfold(this);
    });
  });
  
  // Create paper fold effect
  function createPaperFold(element) {
    const foldLine = document.createElement('div');
    foldLine.style.cssText = `
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(45deg, 
        transparent 40%, 
        rgba(255, 255, 255, 0.8) 50%, 
        transparent 60%);
      transform: translateX(-100%) skewX(-15deg);
      animation: paper-fold 0.6s ease-out;
      pointer-events: none;
      border-radius: 12px;
      z-index: 5;
    `;
    
    element.appendChild(foldLine);
    
    setTimeout(() => {
      if (foldLine.parentNode) {
        foldLine.parentNode.removeChild(foldLine);
      }
    }, 600);
  }
  
  // Create origami unfolding effect
  function createOrigamiUnfold(element) {
    const rect = element.getBoundingClientRect();
    const unfoldContainer = document.createElement('div');
    
    unfoldContainer.style.cssText = `
      position: fixed;
      left: ${rect.left}px;
      top: ${rect.top}px;
      width: ${rect.width}px;
      height: ${rect.height}px;
      pointer-events: none;
      z-index: 9999;
      transform-style: preserve-3d;
      perspective: 1000px;
    `;
    
    // Create multiple paper pieces
    for (let i = 0; i < 6; i++) {
      const piece = document.createElement('div');
      const angle = (i * 60) * Math.PI / 180;
      const distance = 80 + Math.random() * 40;
      
      piece.style.cssText = `
        position: absolute;
        width: ${20 + Math.random() * 15}px;
        height: ${20 + Math.random() * 15}px;
        background: linear-gradient(135deg, 
          hsl(${200 + Math.random() * 60}, 70%, 85%) 0%, 
          hsl(${200 + Math.random() * 60}, 70%, 75%) 100%);
        border-radius: 3px;
        transform-origin: center;
        animation: origami-unfold-${i} 1.2s ease-out;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
      `;
      
      unfoldContainer.appendChild(piece);
      
      // Animate each piece
      piece.animate([
        {
          transform: 'translate(0, 0) rotateX(0deg) rotateY(0deg) scale(1)',
          opacity: 1
        },
        {
          transform: `translate(${Math.cos(angle) * distance}px, ${Math.sin(angle) * distance}px) 
                     rotateX(${Math.random() * 360}deg) rotateY(${Math.random() * 360}deg) scale(0)`,
          opacity: 0
        }
      ], {
        duration: 1200,
        easing: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)'
      });
    }
    
    document.body.appendChild(unfoldContainer);
    
    setTimeout(() => {
      if (unfoldContainer.parentNode) {
        unfoldContainer.parentNode.removeChild(unfoldContainer);
      }
    }, 1200);
  }
  
  // Interactive bird animation
  origamiBird.addEventListener('mouseenter', function() {
    this.style.animation = 'bird-float 0.5s ease-in-out';
    
    // Make wings flap faster
    const wings = this.querySelectorAll('.wing');
    wings.forEach(wing => {
      wing.style.animation = 'wing-flap 0.3s ease-in-out infinite';
    });
  });
  
  origamiBird.addEventListener('mouseleave', function() {
    this.style.animation = 'bird-float 4s ease-in-out infinite';
    
    // Reset wing animation
    const wings = this.querySelectorAll('.wing');
    wings.forEach(wing => {
      wing.style.animation = 'wing-flap 2s ease-in-out infinite';
    });
  });
  
  // Logo interaction
  logoFold.addEventListener('click', function() {
    // Create paper crane animation
    createPaperCrane();
  });
  
  function createPaperCrane() {
    const crane = document.createElement('div');
    const rect = logoFold.getBoundingClientRect();
    
    crane.style.cssText = `
      position: fixed;
      left: ${rect.left + rect.width / 2}px;
      top: ${rect.top + rect.height / 2}px;
      width: 30px;
      height: 30px;
      background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
      transform: translate(-50%, -50%) rotateZ(45deg);
      border-radius: 50% 10% 50% 10%;
      pointer-events: none;
      z-index: 9999;
      box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    `;
    
    document.body.appendChild(crane);
    
    // Animate crane flying away
    crane.animate([
      {
        transform: 'translate(-50%, -50%) rotateZ(45deg) scale(1)',
        opacity: 1
      },
      {
        transform: 'translate(-50%, -300px) rotateZ(405deg) scale(0.3)',
        opacity: 0
      }
    ], {
      duration: 2000,
      easing: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)'
    }).onfinish = () => {
      if (crane.parentNode) {
        crane.parentNode.removeChild(crane);
      }
    };
  }
  
  // Parallax effect on mouse move
  document.addEventListener('mousemove', function(e) {
    const mouseX = e.clientX / window.innerWidth;
    const mouseY = e.clientY / window.innerHeight;
    
    // Move paper texture
    const paperTexture = document.querySelector('.paper-texture');
    if (paperTexture) {
      paperTexture.style.transform = `translate(${mouseX * 10}px, ${mouseY * 10}px)`;
    }
    
    // Tilt menu container slightly
    const tiltX = (mouseY - 0.5) * 5;
    const tiltY = (mouseX - 0.5) * -5;
    
    menuContainer.style.transform = `perspective(1000px) rotateX(${tiltX}deg) rotateY(${tiltY}deg)`;
  });
  
  // Add CSS animations
  const style = document.createElement('style');
  style.textContent = `
    @keyframes paper-fold {
      0% {
        transform: translateX(-100%) skewX(-15deg);
        opacity: 0;
      }
      50% {
        transform: translateX(0%) skewX(-15deg);
        opacity: 1;
      }
      100% {
        transform: translateX(100%) skewX(-15deg);
        opacity: 0;
      }
    }
  `;
  document.head.appendChild(style);
  
  // Random paper flutter effect
  setInterval(() => {
    if (Math.random() < 0.3) {
      const randomLink = menuLinks[Math.floor(Math.random() * menuLinks.length)];
      createPaperFold(randomLink);
    }
  }, 3000);
  
  // Keyboard navigation with origami effects
  let currentIndex = -1;
  
  document.addEventListener('keydown', function(e) {
    if (e.key === 'Tab') {
      e.preventDefault();
      currentIndex = (currentIndex + 1) % menuLinks.length;
      
      menuLinks.forEach((link, index) => {
        if (index === currentIndex) {
          link.focus();
          link.style.transform = 'translateY(-3px) rotateX(5deg)';
          createPaperFold(link);
        } else {
          link.style.transform = '';
        }
      });
    }
    
    if (e.key === 'Enter' && currentIndex >= 0) {
      createOrigamiUnfold(menuLinks[currentIndex]);
    }
  });
});