.navbar {
  position: absolute; 
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000; 
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 1rem;
  background: transparent; 
  color: white;
  box-shadow: none;
}

.navbar nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 1em;
  background-color: rgba(0, 0, 0, 0.8);
  border-radius: 10px;
  font-family: Arial, Helvetica, sans-serif;
}

.navbar nav ul li a {
  color: white;
  text-decoration: none;
  transition: text-decoration 0.5s ease-in;
}

.navbar nav ul li a:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

.menu-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
}

@media (max-width: 768px) {

.navbar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

  .menu-toggle {
    display: block;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 999px;
    padding:0.5em;
    font-size:1.1em;
  }

  .navbar nav {
    display: none;
    flex-direction: column;
    background:none;
    width: 100%;
  }

  .navbar nav.open {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .navbar nav ul {
    flex-direction: column;
    padding:0.5em;
    margin-top:10px;
    background-color: #333;
    font-family: Arial, Helvetica, sans-serif;
    border-radius: 10px;
    font-size: 1.1em;
    gap: 0;
  }

  .navbar nav ul li {
    padding: 0.5rem 1rem;
    border-top: 1px solid #444;
  }

  .navbar nav ul li:first-of-type {
    border:none;
  }
}