.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 999; 
}

.drawer-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.user-drawer {
  position: fixed;
  top: 82px;
  right: 0;
  width: 280px;
  height: 200px;
  background: rgba(255, 255, 255, 0.836);
  box-shadow: -3px 0 15px rgb(0 0 0 / 0.3);
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  padding: 20px;
  pointer-events: none;
}

.user-drawer.open {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.user-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-drawer-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

#close-drawer {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
}

.user-drawer-links {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

.user-drawer-links li {
  margin-bottom: 15px;
}

.user-drawer-links a {
  color: #333;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
}

.user-drawer-links a.logout-link {
  color: red;
  font-weight: 700;
}

.user-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.user-drawer-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: #000000;
}

#close-drawer {
  font-size: 1.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #444;
  transition: color 0.2s ease;
}

#close-drawer:hover {
  color: red;
}

.user-drawer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-drawer-links li a {
  font-size: 1.1rem;
  text-decoration: none;
  color: #333;
  padding: 10px 15px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.user-drawer-links li a:hover {
  color: rgb(193, 193, 193);
}

.logout-link {
  color: #d93025;
  font-weight: 700;
}

.logout-link:hover {
  color: white;
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 1400;
}

.drawer-overlay.show {
  opacity: 1;
  visibility: visible;
}

#user-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
}

.user-drawer-content {
  display: flex;
  align-items: center;
  gap: 15px; 
}

.user-avatar {
  margin-top: -22px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
  .user-drawer {
    position: fixed;
    top: 80px; 
    right: 0;
    width: 240px; 
    height: 150px; 
    background: rgba(255, 255, 255, 0.836);
    box-shadow: -3px 0 15px rgb(0 0 0 / 0.3);
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1500;
    display: flex;
    flex-direction: column;
    padding: 15px; 
    pointer-events: none;
  }
}

