.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  background-color: #212529; /* Match body background */
  font-size: clamp(1rem, 1.5vw, 1.3rem); /* Responsive font sizing */
}

.nav-m-right {
  display: flex;
  gap: 1rem;
}

.nav-height-60 {
  height: 60px;
}

.nav-animatedButton {
  transition: all 0.3s ease;
}

.nav-animatedButton:hover {
  transform: translateY(-3px);
}

.nav-clearFonts {
  font-weight: 500;
}

.nav-centerText {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.profile-container {
  display: flex;
  align-items: center;
}

#username-small {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem); /* Responsive font sizing */
  color: white;
  margin-left: 5px;
  line-height: 1;
}

.profileButton {
  border: none;
  padding: 5px;
  border-radius: 50%;
  transition: background-color 0.3s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(13, 110, 253, 0.5);
}

.profileButton img {
  width: clamp(35px, 4vw, 45px); /* Responsive image sizing */
  height: clamp(35px, 4vw, 45px);
  border-radius: 50%;
  object-fit: cover;
}

.profileButton:hover {
  background-color: rgba(100, 100, 100, 0.1);
  transform: scale(1.05);
}

.profileButton:active {
  transform: scale(0.95);
}

/* Navbar-specific animations */
.nav-spawnFade {
  animation: navFadeIn 0.5s ease-in-out;
}

.nav-spawnSlide {
  animation: navSlideIn 0.5s ease-in-out;
}

@keyframes navFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes navSlideIn {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Make space for fixed navbar */
.nav-m-top {
  margin-top: 80px; /* Adjust based on your navbar height */
}

.navbar a.active {
  position: relative;
}

.navbar a.active::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background-color: #0d6efd; /* Bootstrap primary blue */
  border-radius: 3px;
  display: block;
}

/* Responsive adjustments for navbar */
@media (max-width: 768px) {
  .navbar {
    padding: 5px 0;
  }

  .nav-m-right {
    gap: 0.5rem;
  }
}

.profile-dropdown {
  animation: fadeIn 0.2s ease-in-out;
}

.dropdown-item {
  cursor: pointer;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}