.sidebar {
  position: fixed;
  right: -300px;
  top: 60px;
  width: 300px;
  height: calc(100vh - 60px);
  background: #1a1a1a;
  box-shadow: -2px 0 20px rgba(0, 0, 0, 0.5);
  transition: right 0.3s ease;
  z-index: 99;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 2rem;
  border-left: 1px solid #333333;
}

.sidebar.open {
  right: 0;
}

.discord-button {
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.6);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: auto;
  max-width: 220px;
}

.discord-icon {
  font-size: 1rem;
}

.discord-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.discord-button:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.05);
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 0 1.5rem;
}

.user-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid #5865F2;
  object-fit: cover;
  box-shadow: 0 8px 25px rgba(88, 101, 242, 0.4);
  animation: avatarScale 0.6s ease-out; 
}

.user-avatar-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: white;
  border: 4px solid #5865F2;
  box-shadow: 0 8px 25px rgba(88, 101, 242, 0.4);
}

@keyframes avatarScale {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.username {
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  word-break: break-word;
  text-align: center;
}

.logout-button {
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.6);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  width: auto;
  max-width: 160px;
}

.logout-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.logout-button:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding: 1rem 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  width: 100%;
  font-weight: 600;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.sidebar-back-link:hover {
  color: #ffffff;
}

.back-icon {
  font-size: 1.6rem;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
}

.sidebar-back-link:hover .back-icon {
  color: #ffffff;
}

.back-text {
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 1.1rem;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  padding: 0 1rem;
}

.sidebar-item {
  display: flex;
  align-items: center;
  padding: 0.8rem 1.2rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  font-weight: 500;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.sidebar-item.active {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-left: 3px solid #ffffff;
  padding-left: calc(1.2rem - 3px);
}

@media (max-width: 768px) {
  .sidebar {
    width: 250px;
    right: -250px;
    top: 50px;
    height: calc(100vh - 50px);
  }
}
