/* 语言选择器样式 */
.language-selector {
  position: relative;
  display: inline-block;
  margin-top: 10px;
}

.language-selector-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.language-selector-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.language-selector-btn:active {
  transform: translateY(0);
}

/* 语言图标 */
.language-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.language-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* 下拉箭头 */
.dropdown-arrow {
  width: 12px;
  height: 12px;
  transition: transform 0.3s ease;
  margin-left: 4px;
}

.language-selector.active .dropdown-arrow {
  transform: rotate(180deg);
}

/* 下拉菜单 */
.language-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10000001;
  overflow: hidden;
}

.language-selector.active .language-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 语言选项 */
.language-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  color: #333;
  text-decoration: none;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.language-option:last-child {
  border-bottom: none;
}

.language-option::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  transition: width 0.3s ease;
}

.language-option:hover {
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  color: #667eea;
  padding-left: 24px;
}

.language-option:hover::before {
  width: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 国旗图标 */
.flag-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* 语言名称 */
.language-name {
  font-size: 14px;
  font-weight: 500;
  flex: 1;
}

/* 当前选中的语言 */
.language-option.current {
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  color: #667eea;
  font-weight: 600;
}

.language-option.current::after {
  content: '✓';
  position: absolute;
  right: 16px;
  color: #667eea;
  font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .language-selector-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  .language-dropdown {
    min-width: 180px;
  }
  
  .language-option {
    padding: 10px 14px;
  }
}

/* 动画效果 */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

.language-selector-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  animation: ripple 0.6s ease-out;
}

.language-selector-btn:active::after {
  animation: ripple 0.6s ease-out;
}