.header {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 1rem;
  height: 85px;
  padding: 0 15px;
}

.header-inner {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  width: 100%;
  max-width: 1030px;
}

@media (min-width: 1400px) {
  .header-inner {
    max-width: 1080px;
  }
}

.header .navbar {
  flex-shrink: 0;
  position: relative;
  z-index: 1000;
  height: 100%;
  display: flex;
  align-items: center;
}

.navbar-user-container {
  position: relative;
  height: 100%;
  aspect-ratio: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1001;
}

.btn-user-icon {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  font-size: 2.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

.btn-user-icon:hover {
  color: rgba(255, 255, 255, 1);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 220px;
  background: rgba(37, 31, 59, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(157, 124, 255, 0.3);
  border-radius: 12px;
  padding: 0.5rem;
  z-index: 1000;
  animation: dropdownSlide 0.2s ease-out;
}

@keyframes dropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.3s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.dropdown-item i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 1);
}

.dropdown-item-danger {
  color: rgba(255, 100, 100, 0.9);
}

.dropdown-item-danger:hover {
  background: rgba(255, 100, 100, 0.15);
  color: rgba(255, 100, 100, 1);
}

.mobile-menu-toggle {
  display: none;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  align-items: center;
  justify-content: center;
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
}

.mobile-menu-container {
  position: fixed;
  top: 110px;
  left: 15px;
  right: 15px;
  background: rgba(37, 31, 59, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(157, 124, 255, 0.3);
  border-radius: 18px;
  padding: 1.5rem;
  z-index: 999;
  animation: mobileMenuSlide 0.3s ease-out;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
}

@keyframes mobileMenuSlide {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-nav-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav-item {
  margin: 0;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.2rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  width: 100%;
  text-align: left;
}

.mobile-nav-link i {
  font-size: 1.3rem;
  width: 24px;
  text-align: center;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: rgba(157, 124, 255, 0.25);
  color: #9D7CFF;
}

.mobile-nav-link-danger {
  color: rgba(255, 100, 100, 0.9);
}

.mobile-nav-link-danger:hover {
  background: rgba(255, 100, 100, 0.15);
  color: rgba(255, 100, 100, 1);
}

.mobile-user-section {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (max-width: 991.98px) {
  .header {
    height: auto;
    top: 15px;
  }

  .header-inner {
    max-width: 100%;
    height: auto;
    padding: 0;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .navbar {
    display: none !important;
  }

  .desktop-nav {
    display: none !important;
  }

  .navbar-user-container {
    display: none !important;
  }

  .btn-user-icon {
    font-size: 2rem;
  }

  .user-dropdown {
    right: 0;
    left: auto;
  }
}

@media (max-width: 575.98px) {
  .header {
    padding: 0 10px;
    top: 10px;
  }

  .header-inner {
    gap: 0.5rem;
  }

  .mobile-menu-toggle {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .navbar-user-container {
    display: none !important;
  }

  .btn-user-icon {
    font-size: 1.8rem;
  }

  .mobile-menu-container {
    top: 75px;
    left: 10px;
    right: 10px;
    padding: 1rem;
    max-height: calc(100vh - 95px);
  }

  .mobile-nav-link {
    padding: 0.9rem 1rem;
    font-size: 1rem;
  }
}
