.navbar {
  position: fixed;
  top: 10px; 
  left: 50%;
  width: 50%; 
  max-width: 800px;
  background: rgba(255, 255, 255, 0.35); 
  backdrop-filter: blur(15px); 
  border-radius: 30px; 
  box-shadow: 0 8px 25px rgba(0,0,0,0.15); 
  z-index: 1000; 
  padding: 10px 20px;

  /* Animation */
  opacity: 0; 
  transform: translate(-50%, 0);
  animation: navBarfadeIn 1s ease forwards;
  animation-delay: 3s; 
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-items {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: space-around;
  width: 100%;
}

.nav-items li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 8px 15px;
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-items li a:hover {
  color: #000;
  transform: translateY(-2px);
}

.nav-items li a.active::after {
  content: "";
  position: absolute;
  bottom: 0px; 
  left: 50%; 
  transform: translateX(-50%); 
  width: 25px; 
  height: 2px; 
  background: #f1f2f3; 
  border-radius: 2px;
}

/* Hamburger styles */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  top:15px;
}

.hamburger span {
  height: 3px;
  width: 25px;
  background: white;
  border-radius: 2px;
}

.mini-navbar {
  position: fixed; /* stick to screen */
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.75); /* glass effect */
  backdrop-filter: blur(15px);
  border-radius: 35px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  z-index: 1000;
  padding: 10px 15px;
  width: auto; /* adjust to content */
  cursor: pointer;

  /* Animation */
  opacity: 0; /* start hidden */
  transform: translateY(-20px); /* initial slide-up effect */
  animation: navBarfadeInMini 1s ease forwards; /* fade-in animation */
  animation-delay: 3s; /* start after 2 seconds */

  height: 5%;
  display: flex;
  align-items: center;
}

/* Hover effect */
.mini-navbar:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px); /* subtle lift */
  color: #363942;
}

.mini-nav-items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mini-nav-items li a {
  color: #363942;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 5px 10px;
  border-radius: 10px;
  position: relative;
  transition: all 0.3s ease;
}

.mini-nav-items li a:hover {
  color: #000;
  transform: translateY(-2px);
}

/* Responsive rules */
@media (max-width: 850px) {
  /* Hide full menu */

  .navbar {
    background: none;
    width: 100%;
    top: 0;
  }

  .nav-items {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    flex-direction: column;
    width: 200px;
    height: 100vh;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(15px);
    padding-top: 60px;
    padding-left: 0;
    margin: 0;
    border-radius: 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    height: 5%;
  }

  .nav-items li {
    margin: 20px 0;
    text-align: center;
  }

  .hamburger {
    display: flex;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1100;
  }

  /* Show menu when active */
  .nav-items.show {
    display: flex;
    width: 100%;
    background: rgba(53, 53, 53, 0.849);
  }

  .mini-navbar {
    position: fixed; /* stick to screen */
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.75); /* glass effect */
    backdrop-filter: blur(15px);
    border-radius: 35px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 10px 15px;
    width: auto; /* adjust to content */
    height: 35px;
    cursor: pointer;
    display: flex;
    align-items: center;

    /* Animation */
    opacity: 0; /* start hidden */
    transform: translateY(-20px); /* initial slide-up effect */
    animation: navBarfadeInMini 1s ease forwards; /* fade-in animation */
    animation-delay: 3s; /* start after 2 seconds */
  }

  .mini-nav-items li a {
    color: #363942;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8rem;
    border-radius: 10px;
    position: relative;
    transition: all 0.3s ease;
  }
}

/* Fade-in Animation */
@keyframes navBarfadeIn {
  0% { opacity: 0; transform: translate(-50%, -20px); }
  100% { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes navBarfadeInMini {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}