/* 用户信息下拉菜单样式 */

.user-info-dropdown {
  position: relative;
  display: inline-block;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid #ddd;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.user-btn:hover {
  background: #f5f5f5;
  border-color: #999;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.user-avatar-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
}

.user-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-arrow {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.user-btn:hover .dropdown-arrow {
  transform: rotate(180deg);
}

/* 下拉菜单 */
.user-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 280px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.user-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 用户信息卡片 */
.user-info-card {
  padding: 16px;
}

.user-header {
  text-align: center;
  margin-bottom: 12px;
}

.user-avatar-large {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #2196F3;
}

.user-avatar-placeholder-large {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 24px;
  margin: 0 auto;
  border: 2px solid #2196F3;
}

.user-details {
  text-align: center;
}

.user-name-large {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin-bottom: 4px;
}

.user-email {
  font-size: 12px;
  color: #999;
  margin-bottom: 8px;
}

.user-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 8px 0;
  font-size: 14px;
}

.score-label {
  color: #666;
}

.score-value {
  font-weight: bold;
  color: #FF9800;
  font-size: 16px;
}

.user-auth-method {
  font-size: 12px;
  color: #4CAF50;
  margin-top: 8px;
}

.user-auth-method a {
  color: #2196F3;
  text-decoration: none;
}

.user-auth-method a:hover {
  text-decoration: underline;
}

/* 下拉菜单项 */
.dropdown-item {
  display: block;
  padding: 10px 16px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.dropdown-item:hover {
  background: #f5f5f5;
  border-left-color: #2196F3;
  padding-left: 13px;
}

.dropdown-item.logout {
  color: #f44336;
}

.dropdown-item.logout:hover {
  background: #ffebee;
  border-left-color: #f44336;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .user-name {
    display: none;
  }
  
  .user-btn {
    padding: 6px 8px;
    border-radius: 50%;
  }
  
  .user-dropdown-menu {
    right: -50px;
    min-width: 250px;
  }
}

@media (max-width: 480px) {
  .user-dropdown-menu {
    right: -100px;
    min-width: 200px;
  }
  
  .user-info-card {
    padding: 12px;
  }
  
  .user-avatar-large {
    width: 50px;
    height: 50px;
  }
  
  .user-avatar-placeholder-large {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
}
