/* ===================================
   Premium User Dropdown - Unique Design
   =================================== */

.user-dropdown {
  position: relative;
}

/* User Button with Animated Gradient Border */
.user-icon-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.25rem;
  background: linear-gradient(135deg, rgba(26, 31, 58, 0.95) 0%, rgba(45, 53, 97, 0.95) 100%);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 50px;
  color: var(--color-text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Animated Border Effect */
.user-icon-btn::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #4facfe);
  background-size: 300% 300%;
  border-radius: 50px;
  z-index: -1;
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* Glow Effect on Hover */
.user-icon-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(102, 126, 234, 0.3), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: 50px;
}

.user-icon-btn:hover::after {
  opacity: 1;
}

.user-icon-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4), 0 0 40px rgba(139, 92, 246, 0.2);
}

/* User Circle Icon with Gradient */
.user-icon-btn i.fa-user-circle {
  font-size: 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

.user-icon-btn span {
  font-size: 0.9375rem;
  letter-spacing: 0.3px;
}

.user-icon-btn i.fa-chevron-down {
  font-size: 0.75rem;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--color-text-muted);
}

.user-dropdown.active .user-icon-btn i.fa-chevron-down {
  transform: rotate(180deg);
  color: var(--color-primary-light);
}

/* Premium Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 1rem);
  right: 0;
  min-width: 260px;
  background: linear-gradient(135deg, rgba(26, 31, 58, 0.98) 0%, rgba(45, 53, 97, 0.98) 100%);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 20px;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(102, 126, 234, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: none !important;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  backdrop-filter: blur(30px);
  overflow: hidden;
}


.user-dropdown.active .dropdown-menu {
  display: block !important;
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Force dropdown hidden by default - High specificity */
#dropdownMenu {
  display: none !important;
}

/* Show dropdown when active - High specificity */
.user-dropdown.active #dropdownMenu {
  display: block !important;
}


/* Profile Header Section */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 90px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 0;
}

/* Profile Section Inside Dropdown */
.dropdown-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.profile-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  flex-shrink: 0;
}

.profile-avatar i {
  animation: none;
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.3px;
}

.profile-email {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dropdown Items with Enhanced Design */
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.125rem 1.5rem;
  color: var(--color-text-secondary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
  z-index: 1;
  font-weight: 500;
}

/* Gradient Hover Background */
.dropdown-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #667eea, #764ba2, #f093fb);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.dropdown-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dropdown-item:last-child {
  border-bottom: none;
}

/* Hover Effects */
.dropdown-item:hover {
  color: #ffffff;
  padding-left: 1.75rem;
  background: rgba(102, 126, 234, 0.1);
}

.dropdown-item:hover::before {
  transform: scaleY(1);
}

.dropdown-item:hover::after {
  opacity: 1;
}

/* Icon Styling with Gradient */
.dropdown-item i {
  font-size: 1.25rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.dropdown-item:hover i {
  transform: scale(1.15) rotate(5deg);
  filter: drop-shadow(0 0 8px rgba(102, 126, 234, 0.6));
}

/* Special Logout Button Styling */
.dropdown-item#logoutBtn {
  margin-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-item#logoutBtn i {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dropdown-item#logoutBtn:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* ===================================
   Mobile Responsive Styles
   =================================== */

@media (max-width: 768px) {

  /* Hide username and chevron on mobile, show only icon */
  .user-icon-btn span {
    display: none;
  }

  .user-icon-btn i.fa-chevron-down {
    display: none;
  }

  /* Make button circular on mobile */
  .user-icon-btn {
    padding: 0.625rem;
    border-radius: 50%;
    min-width: 48px;
    min-height: 48px;
    justify-content: center;
  }

  .user-icon-btn::before {
    border-radius: 50%;
  }

  .user-icon-btn i.fa-user-circle {
    font-size: 1.75rem;
  }

  /* Adjust dropdown position for mobile */
  .dropdown-menu {
    right: 0;
    left: auto;
    min-width: 240px;
  }
}