.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 3001;
  display: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.sidebar-overlay.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 70px;
  background: transparent;
  backdrop-filter: blur(0.75px);
  animation: navBg linear;
  animation-timeline: scroll();
  animation-range: 0 200px;
  animation-fill-mode: forwards;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease-in-out;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  z-index: 2000;
}

@keyframes navBg {
  to {
    border-bottom-color: rgba(255, 255, 255, 0.08);
    background: rgba(10, 14, 20, 0.75);
    backdrop-filter: blur(20px) saturate(1.4);
  }
}

.hamburger-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(22, 27, 34, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  margin-right: 12px;
  flex-shrink: 0;
  padding: 0;
  z-index: 0;
}

.hamburger-btn:hover {
  background: rgba(30, 36, 46, 0.9);
  border-color: rgba(119, 218, 255, 0.35);
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(119, 218, 255, 0.2);
}

.hamburger-btn .hamburger-icon,
.hamburger-btn .avatar-icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hamburger-btn .hamburger-icon {
  opacity: 1;
  transform: scale(1);
}

.hamburger-btn .hamburger-icon i {
  font-size: 1.5em;
  color: var(--mp-ocean, #77daff);
  filter: drop-shadow(0 0 6px rgba(119, 218, 255, 0.4));
}

.hamburger-btn .avatar-icon {
  opacity: 0;
  transform: scale(0.8);
}

.hamburger-btn .avatar-icon img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.hamburger-btn.logged-in .hamburger-icon {
  opacity: 0;
  transform: scale(0.8);
}

.hamburger-btn.logged-in .avatar-icon {
  opacity: 1;
  transform: scale(1);
}

.hamburger-btn.logged-out .hamburger-icon {
  opacity: 1;
  transform: scale(1);
}

.hamburger-btn.logged-out .avatar-icon {
  opacity: 0;
  transform: scale(0.8);
}

.hamburger-btn .avatar-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background: #e74c3c;
  border-radius: 50%;
  border: 2px solid #0a0e14;
  display: none;
}

.hamburger-btn .avatar-badge.show {
  display: block;
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.sidebar {
  position: fixed;
  top: 0;
  left: -320px;
  width: 320px;
  height: 100%;
  background: rgba(22, 27, 34, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 3002;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow:
    5px 0 40px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(119, 218, 255, 0.05);
  padding: 0;
  margin: 0;
  top: 0;
}

.sidebar.open {
  left: 0;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(22, 27, 34, 0.5);
  flex-shrink: 0;
}

.sidebar-header .logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-header .logo img {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 0 20px rgba(119, 218, 255, 0.3);
}

.sidebar-header .logo span {
  font-size: 1.2em;
  font-family: 'Outfit', system-ui, -apple-system;
  color: white;
  font-weight: bold;
}

.sidebar-header .logo span .bold-pack {
  font-weight: 800;
  font-size: inherit;
  color:#77daff;
  filter: drop-shadow(0 0 14px rgba(119, 218, 255, 0.4));
}

.close-sidebar {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2em;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.close-sidebar:hover {
  background: #e74c3c;
  border-color: #e74c3c;
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.35);
}

.sidebar-profile {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  margin: 8px;
  border-radius: 14px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 15px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-profile:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(119, 218, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.sidebar-profile:hover .sidebar-avatar {
  transform: scale(1.05);
  border-color: var(--mp-ocean, #77daff);
}

.sidebar-profile-id {
  display: flex;
  flex-direction: column;
  text-align: left;
  flex: 1;
}

.sidebar-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #73889f;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(119, 218, 255, 0.2);
}

.sidebar-username {
  font-size: 1.1em;
  font-weight: bold;
  color: white;
  font-family: 'Outfit', system-ui, -apple-system;
  text-align: left;
  word-break: break-word;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8em;
  cursor: help;
}

.user-badge i {
  font-size: 0.85em;
}

.sidebar-user-bio {
  font-size: 0.75em;
  color: #8b96a3;
  margin-top: 5px;
  text-align: left;
  word-break: break-word;
  line-height: 1.4;
}

.sidebar-nav {
  flex: 1;
  padding: 15px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 16px;
  color: white;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Outfit', system-ui, -apple-system;
  border-radius: 12px;
  border: 1px solid transparent;
  position: relative;
    
}

.sidebar-nav-item:hover {
  background: rgba(119, 218, 255, 0.08);
  border-color: rgba(119, 218, 255, 0.2);
  transform: translateX(4px);
}

.sidebar-nav-item i {
  width: 24px;
  color: var(--mp-ocean, #77daff);
  font-size: 1.1em;
  text-align: center;
  filter: drop-shadow(0 0 4px rgba(119, 218, 255, 0.3));
  transition: all 0.25s ease;
}

.sidebar-nav-item:hover i {
  color: var(--mp-ocean, #77daff);
  filter: drop-shadow(0 0 8px rgba(119, 218, 255, 0.6));
  transform: scale(1.1);
}

.sidebar-nav-item.active {
  background: linear-gradient(135deg, rgba(119, 218, 255, 0.15), rgba(123, 92, 255, 0.1));
  border-color: rgba(119, 218, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(119, 218, 255, 0.15);
}

.sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 10px 16px;
}

.sidebar-actions {
  padding: 15px 20px 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  background: rgba(22, 27, 34, 0.5);
}

.sidebar-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px;
  border-radius: 30px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Outfit', system-ui, -apple-system;
  font-size: 0.95em;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.sidebar-action-btn.login {
  background: linear-gradient(135deg, var(--mp-ocean, #77daff), #4aa8c9);
  color: #0a0e14;
  box-shadow: 0 4px 16px rgba(119, 218, 255, 0.3);
}

.sidebar-action-btn.login:hover {
  box-shadow: 0 8px 24px rgba(119, 218, 255, 0.5);
  transform: translateY(-2px);
}

.sidebar-action-btn.register {
  background: rgba(255, 255, 255, 0.06);
  color: white;
}

.sidebar-action-btn.register:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(119, 218, 255, 0.3);
}

.sidebar-action-btn.logout {
  background: rgba(231, 76, 60, 0.15);
  color: #ff8a80;
  border-color: rgba(231, 76, 60, 0.3);
}

.sidebar-action-btn.logout:hover {
  background: #e74c3c;
  color: white;
  border-color: #e74c3c;
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.35);
  transform: translateY(-2px);
}

.sidebar-action-btn.upload {
  background: linear-gradient(135deg, #7ee787, #4aa85e);
  color: #0a0e14;
  box-shadow: 0 4px 16px rgba(126, 231, 135, 0.3);
}

.sidebar-action-btn.upload:hover {
  box-shadow: 0 8px 24px rgba(126, 231, 135, 0.5);
  transform: translateY(-2px);
}

.sidebar-action-btn:hover {
  transform: translateY(-2px);
}

.sidebar::-webkit-scrollbar {
  width: 5px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(119, 218, 255, 0.3);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(119, 218, 255, 0.5);
}

@media (min-width: 1001px) and (max-width: 1762px) {
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: -380px !important;
    width: 380px !important;
    height: 100vh !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 9999 !important;
    background: rgba(22, 27, 34, 0.98) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-left: none !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 5px 0 40px rgba(0, 0, 0, 0.6) !important;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  .sidebar.open {
    left: 0 !important;
  }

  .sidebar-overlay {
    display: none !important;
  }

  .hamburger-btn {
    display: flex !important;
  }

  .close-sidebar {
    display: none;
  }

  nav {
    left: 0 !important;
    width: 100% !important;
  }

  .main-container,
  .upload-main-container,
  .addon-detail-modal,
  .profile-page,
  .admin-dashboard,
  .announcement-page,
  .settings-wrap,
  .account-wrap,
  .announcement-page-wrapper,
  .profile-wrap,
  .report-container,
  .auth-page,
  .creators-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 50px 20px 20px 20px !important;
    box-sizing: border-box !important;
    transition: margin-left 0.3s ease-in-out !important;
  }

  .main-container.sidebar-open,
  .upload-main-container.sidebar-open,
  .addon-detail-modal.sidebar-open,
  .profile-page.sidebar-open,
  .admin-dashboard.sidebar-open,
  .announcement-page.sidebar-open,
  .settings-wrap.sidebar-open,
  .account-wrap.sidebar-open,
  .announcement-page-wrapper.sidebar-open,
  .profile-wrap.sidebar-open,
  .report-container.sidebar-open,
  .auth-page.sidebar-open,
  .creators-wrapper.sidebar-open {
    margin-left: 380px !important;
    width: calc(100% - 380px) !important;
    max-width: calc(100% - 380px) !important;
    padding: 90px 20px 20px 20px !important;
  }
}

@media (max-width: 1000px) {
  .hamburger-btn {
    display: flex;
  }

  nav .header-actions {
    display: none !important;
  }

  nav {
    justify-content: flex-end;
  }

  .minepacknode {
    position: relative;
    left: 0;
    margin-right: auto;
  }

  .sidebar {
    left: -300px;
    width: 300px;
    padding: 0;
    margin: 0;
    top: 0;
  }

  .sidebar.open {
    left: 0;
  }

  .main-container,
  .upload-main-container,
  .addon-detail-modal,
  .profile-page,
  .admin-dashboard,
  .announcement-page,
  .settings-wrap,
  .account-wrap,
  .announcement-page-wrapper,
  .profile-wrap,
  .report-container,
  .auth-page,
  .creators-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 280px;
    left: -280px;
  }

  .sidebar-nav-item {
    padding: 10px 16px;
    font-size: 0.9em;
  }

  .sidebar-action-btn {
    padding: 10px;
    font-size: 0.9em;
  }

  .sidebar-username {
    font-size: 1em;
  }

  .sidebar-user-bio {
    font-size: 0.7em;
  }

  .sidebar-avatar {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 480px) {
  .sidebar {
    width: 260px;
    left: -260px;
  }
}