
.auth-button {
  display: flex;
  align-items: center;
  position: relative;
}

.auth-button .btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(22, 42, 51, 0.6);
  color: var(--text-light);
  cursor: pointer;
}

.auth-button .btn:hover {
  background: rgba(22, 42, 51, 0.9);
  border-color: var(--primary-color);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.auth-button .btn i {
  font-size: 12px;
}

.profile-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(22, 42, 51, 0.6);
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
}

.profile-trigger:hover {
  background: rgba(22, 42, 51, 0.9);
  border-color: var(--primary-color);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.profile-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-trigger i {
  font-size: 10px;
  transition: transform 0.3s ease;
}

.profile-dropdown.active .profile-trigger i {
  transform: rotate(180deg);
}

.profile-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--bg-dark);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  overflow: hidden;
}

.profile-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-light);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.profile-menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.profile-menu-item i {
  font-size: 12px;
  width: 16px;
  text-align: center;
}

.profile-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 4px 0;
}

.sign-out-btn {
  color: #ff6b6b !important;
}

.sign-out-btn:hover {
  background: rgba(255, 107, 107, 0.1) !important;
  color: #ff6b6b !important;
}

.auth-notification {
  position: fixed;
  top: 80px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  font-size: 14px;
  font-weight: 500;
  max-width: 300px;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
}

.auth-notification.success {
  background: #4CAF50;
  color: white;
}

.auth-notification.error {
  background: #f44336;
  color: white;
}

.auth-notification.info {
  background: #2196F3;
  color: white;
}

@media (max-width: 768px) {
  .auth-button .btn {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  .profile-trigger {
    padding: 4px 8px;
    font-size: 13px;
  }
  
  .profile-avatar {
    width: 20px;
    height: 20px;
  }
  
  .profile-name {
    max-width: 80px;
  }
  
  .profile-menu {
    min-width: 180px;
    right: -10px;
  }
  
  .profile-menu-item {
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .auth-notification {
    right: 10px;
    left: 10px;
    max-width: none;
    transform: translateY(-100%);
  }
  
  .auth-notification.show {
    transform: translateY(0);
  }
}

@media (prefers-color-scheme: dark) {
  .profile-menu {
    background: var(--bg-dark);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .profile-menu-item {
    color: var(--text-light);
  }
  
  .profile-menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-menu.active {
  animation: slideDown 0.3s ease;
}

.profile-trigger:focus,
.auth-button .btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.profile-menu-item:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: -2px;
}

.auth-button.loading .btn {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-button.loading .btn::after {
  content: '';
  width: 12px;
  height: 12px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
