:root {
  --menu-color: rgba(128, 128, 128, 0.8); 
}

#sidebar {
  position: fixed;
  left: -250px;
  top: 60px; 
  width: 250px;
  height: auto;
  background-color: var(--menu-color);
  transition: all 0.3s ease-in-out;
  z-index: 1000;
  border-radius: 0 10px 10px 0;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

#sidebar.active {
  left: 0;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    left: -250px;
    opacity: 0;
  }
  to {
    left: 0;
    opacity: 1;
  }
}

#sidebar ul {
  padding: 20px 0;
  list-style-type: none;
  margin: 0;
}

#sidebar ul li {
  padding: 10px 20px;
  transition: background-color 0.3s ease;
}

#sidebar ul li:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

#sidebar ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 1.2em;
  display: block;
  transition: all 0.3s;
}

#sidebar ul li a:hover {
  transform: translateX(5px);
}

.menu-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  cursor: pointer;
  z-index: 1001;
  font-size: 24px;
  color: #fff;
  background-color: var(--menu-color);
  padding: 10px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.menu-toggle:hover {
  background-color: rgba(128, 128, 128, 0.9); 
}

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.menu-overlay.active {
  display: block;
}

@media (max-width: 768px) {
  #sidebar {
    width: 100%;
    left: -100%;
  }
}

.menu-icon {
    position: relative;
    width: 24px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Font Awesome 6 Free";
    font-weight: bold;
}

.bar {
    position: absolute;
    width: 100%;
    height: 4px; 
    background-color: #fff;
    transition: transform 0.3s ease-in-out,
                opacity 0.2s ease-in-out;
    font-family: "Font Awesome 6 Free";
    font-weight: bold;
    border-radius: 2px; 
}

.top {
    transform: translateY(-8px);
}

.bottom {
    transform: translateY(8px);
}

.menu-toggle.active .top {
    transform: translateY(0) rotate(45deg);
}

.menu-toggle.active .middle {
    opacity: 0;
}

.menu-toggle.active .bottom {
    transform: translateY(0) rotate(-45deg);
}
