.sidebar {
  position: fixed;
  top: 0;
  right: -320px;
  width: 280px;
  height: 100vh;
  background: #000000;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  visibility: hidden;
  pointer-events: none;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 25px 20px;
}

.back-btn {
  width: 32px;
  height: 32px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
}

.back-btn i {
  width: 20px;
  height: 20px;
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

.nav-scroll-container {
  flex: 1;
  overflow-y: auto;
  padding: 0 10px 30px;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-separator {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 15px 10px;
}

/* Sidebar Profile Section */
.profile-section {
  margin-bottom: 5px;
}

.profile-trigger {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px !important;
  background: rgba(255, 255, 255, 0.05);
  margin: 10px 5px;
  padding: 12px 15px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
}

.profile-avatar-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.profile-avatar-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-arrow {
  width: 16px !important;
  height: 16px !important;
  opacity: 0.5;
  transition: transform 0.3s ease;
}

.profile-section.active .profile-arrow {
  transform: rotate(180deg);
}

.profile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  padding-left: 15px;
}

.profile-section.active .profile-submenu {
  max-height: 300px;
  opacity: 1;
  margin-top: 5px;
}

.submenu-item {
  font-size: 0.85rem !important;
  padding: 8px 15px !important;
  color: rgba(255, 255, 255, 0.6) !important;
}

.submenu-item i {
  width: 16px !important;
  height: 16px !important;
  opacity: 0.6;
}

.submenu-item:hover {
  color: #fff !important;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 15px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  opacity: 1;
  transform: none;
  visibility: visible;
}

.nav-item i {
  width: 18px;
  height: 18px;
  color: #fff !important;
  opacity: 0.8;
}

.nav-item span {
  flex: 1;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
}

.nav-item.active i {
  opacity: 1;
}

.sidebar.open {
  right: 0;
  visibility: visible;
  pointer-events: auto;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px); /* Safari support */
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}

body.menu-open .sidebar-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.menu-open .main-content-wrapper,
body.menu-open .mobile-bottom-nav,
body.menu-open .header-right:not(.sidebar) {
  filter: blur(4px);
  transition: filter 0.3s ease;
  pointer-events: none;
}

.main-content-wrapper,
.mobile-bottom-nav,
.header-right {
  transition: filter 0.3s ease;
}

.header-right {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 10001;
}

.menu-toggle {
  position: static;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modal-close:hover {
  color: #fff;
}

@media (max-width: 480px) {
  .profile-trigger {
    padding: 15px !important;
    margin: 10px;
    gap: 15px !important;
  }

  .profile-avatar-small {
    width: 40px;
    height: 40px;
  }

  .profile-submenu {
    padding-left: 20px;
  }

  .submenu-item {
    font-size: 1rem !important;
    padding: 12px 15px !important;
    margin-bottom: 5px;
  }

  .nav-item {
    padding: 14px 20px;
    font-size: 1rem;
    gap: 20px;
  }
}
