.menu-icon {
  position: fixed;
  top: 16px;
  right: 24px;
  width: 60px;
  height: 60px;
  cursor: pointer;
  z-index: 2001;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  padding: 6px;
  transition: background 0.3s ease-out;
}

.menu-icon:hover {
  background: rgba(245, 245, 245, 1);
}

.menu-container {
  position: fixed;
  top: 0;
  left: 50%;
  width: 40%;
  max-width: 40vw;
  max-height: 90vh;
  min-height: 300px;
  background-color: rgba(0,0,0, 0.7);
  color: #fff;
  z-index: 3000;
  transform: translate(-200%, -100%);
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  border-bottom-right-radius: 24px;
  border-bottom-left-radius: 24px;
  box-shadow: 4px 4px 24px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  display: flex;
  flex-direction: column;
}

.menu-container.active {
  transform: translate(-50%, 0);
}

.menu-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 32px 32px 32px; /* Reduced top padding from 40px to 20px */
  flex: 1;
  overflow-y: auto;
 font-family: "Raleway", sans-serif; 
font-size: 14px;
}

.menu-content h1 {
  margin: 0 0 12px 0; /* Reduced bottom margin from 24px to 12px */
  font-size: 1.8em;
  text-align: center;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.6s 0.3s, transform 0.6s 0.3s;
  font-family: "Raleway", sans-serif;
  font-weight: 300;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.8);
}

.menu-container.active .menu-content h1 {
  opacity: 1;
  transform: translateY(0);
}

.menu-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.menu-content ul li {
  margin: 8px 0; /* Reduced from 16px to 8px */
  text-align: center;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.4s;
  position: relative;
  flex-shrink: 0;
}

.menu-container.active .menu-content ul li {
  opacity: 1;
  transform: translateX(0);
}

.menu-content ul li:nth-child(1) { transition-delay: 0.4s; }
.menu-content ul li:nth-child(2) { transition-delay: 0.5s; }
.menu-content ul li:nth-child(3) { transition-delay: 0.6s; }
.menu-content ul li:nth-child(4) { transition-delay: 0.7s; }

.menu-content ul li:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: -8px; /* Reduced from -12px to -8px */
  left: 10%;
  width: 80%;
  height: 2px; /* Reduced from 3px to 2px */
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}

.menu-content ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 1.2em;
  transition: all 0.3s;
  padding: 8px 20px; /* Reduced top/bottom padding from 10px to 8px */
  border-radius: 4px;
  display: inline-block;
  position: relative;
  letter-spacing: 1px;
  font-family: "Raleway", sans-serif;
  font-weight: 400;
  width: 100%;
  box-sizing: border-box;
}

.menu-content ul li a:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
  text-shadow: 0 0 8px rgba(255,255,255,0.3);
}

.menu-content ul li a::after {
  content: '';
  position: absolute;
  bottom: 6px; /* Adjusted from 8px to 6px */
  left: 50%;
  width: 0;
  height: 2px;
  background: white;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.menu-content ul li a:hover::after {
  width: 80%;
}

.menu-close {
  position: absolute;
  top: 16px;
  right: 24px;
  font-size: 2em;
  cursor: pointer;
  background: none;
  border: none;
  color: #fff;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  z-index: 1;
}

.menu-close:hover {
  transform: rotate(135deg) scale(1.1);
  background: rgba(255,255,255,0.1);
}

.menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.18);
  z-index: 2999;
  backdrop-filter: blur(2px);
}  

.menu-overlay.active {
  display: block;
  backdrop-filter: blur(4px);
}

@media (max-width: 1024px) {
  .menu-icon {
    width: 40px;
    height: 40px;
    top: 10px;
    right: 10px;
    padding: 4px;
  }
  .menu-container {
    max-height: 80vh;
    width: 52%;
    max-width: 52vw;
    min-height: 250px;
  }
  .menu-content {
    margin-top: 30px; /* Reduced from 40px */
    padding: 20px 20px; /* Reduced from 30px 20px */
  }
  .menu-content ul li {
    margin: 8px 0; /* Reduced from 12px */
  }
}

@media (max-width: 768px) {
  .menu-container {
    width: 60%;
    max-width: 60vw;
    max-height: 85vh;
  }
  .menu-content {
    padding: 15px 15px; /* Reduced from 20px 15px */
    margin-top: 20px; /* Reduced from 30px */
  }
  .menu-content h1 {
    font-size: 1.5em;
    margin-bottom: 10px; /* Reduced from 16px */
  }
  .menu-content ul li a {
    font-size: 1.1em;
    padding: 6px 16px; /* Reduced from 8px 16px */
  }
}

@media (max-height: 600px) {
  .menu-container {
    max-height: 85vh;
  }
  .menu-content ul li {
    margin: 6px 0; /* Reduced from 10px */
  }
}