/* 语言切换按钮样式 */
.lang-switch-container {
  position: relative;
  display: inline-block;
}

.lang-switch-button {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-switch-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.lang-switch-button:active {
  transform: translateY(0);
}

.lang-switch-button i {
  font-size: 12px;
}

/* 语言下拉菜单 */
.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  min-width: 140px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  overflow: hidden;
}

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

.lang-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: #374151;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.lang-dropdown-item:hover {
  background: #f3f4f6;
  color: #3b82f6;
}

.lang-dropdown-item.active {
  background: #eff6ff;
  color: #3b82f6;
  font-weight: 600;
}

.lang-dropdown-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

/* 语言图标 */
.lang-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}

/* 移动端语言下拉菜单位置修正 */
#langDropdownMobile {
  right: 0;
  left: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  #langDropdownMobile {
    right: 0;
    left: 0;
  }

  .lang-switch-button {
    padding: 6px 12px;
    font-size: 12px;
  }

  .lang-dropdown {
    right: -50px;
    min-width: 120px;
  }

  .lang-dropdown-item {
    padding: 10px 12px;
    font-size: 13px;
  }
}

/* 加载动画 */
@keyframes langSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.lang-switch-button.loading i {
  animation: langSpin 1s linear infinite;
}