/**
 * 语言切换器样式 - 优化版本（右上角，自然融入）
 */

/* 语言切换器容器 - 固定在右上角 */
.language-switcher {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.95);
  padding: 6px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  opacity: 0.9;
}

.language-switcher:hover {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.25);
  transform: translateY(-1px);
  border-color: rgba(102, 126, 234, 0.35);
  opacity: 1;
}

/* 语言图标 */
.language-icon {
  font-size: 18px;
  line-height: 1;
  user-select: none;
  opacity: 0.8;
}

/* 语言选择框 */
.language-select {
  border: none;
  border-radius: 15px;
  padding: 5px 10px 5px 8px;
  font-size: 13px;
  background: transparent;
  color: #555;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  font-weight: 500;
  min-width: 100px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3e%3cpath fill='%23666' d='M6 9L1 4h10z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 10px;
  padding-right: 22px;
}

.language-select:hover {
  color: #667eea;
}

.language-select:focus {
  color: #667eea;
  background-color: rgba(102, 126, 234, 0.05);
}

/* 语言切换提示 */
.lang-change-toast {
  position: fixed;
  top: 75px;
  right: 20px;
  transform: translateY(-10px);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.95));
  color: white;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lang-change-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* 移动端适配 */
@media (max-width: 600px) {
  .language-switcher {
    top: 12px;
    right: 12px;
    padding: 5px 8px;
    gap: 5px;
    border-radius: 18px;
  }
  
  .language-icon {
    font-size: 16px;
  }
  
  .language-select {
    font-size: 12px;
    padding: 4px 18px 4px 6px;
    min-width: 85px;
    background-size: 9px;
    background-position: right 3px center;
  }
  
  .lang-change-toast {
    top: 70px;
    font-size: 13px;
    padding: 8px 16px;
  }
}

/* 确保语言切换器在深色背景上也清晰可见 */
@media (prefers-color-scheme: dark) {
  .language-switcher {
    background: rgba(40, 40, 40, 0.92);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .language-switcher:hover {
    background: rgba(50, 50, 50, 0.95);
    border-color: rgba(102, 126, 234, 0.4);
  }
  
  .language-icon {
    opacity: 0.9;
  }
  
  .language-select {
    background: transparent;
    color: #e0e0e0;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3e%3cpath fill='%23ccc' d='M6 9L1 4h10z'/%3e%3c/svg%3e");
  }
  
  .language-select:hover {
    color: #667eea;
  }
  
  .language-select:focus {
    color: #8b9aff;
    background-color: rgba(102, 126, 234, 0.15);
  }
}

