/* ============= 语言切换器样式 ============= */
/* 电脑端语言切换器 */
.language-switcher {
  display: flex;
  align-items: center;
  margin-left: 20px;
  border: 1px solid rgba(255, 122, 0, 0.3);
  border-radius: 18px; /* 减小圆角半径 */
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); /* 减小阴影 */
}

/* 语言按钮基础样式 */
.language-switcher .lang-btn {
  padding: 5px 12px !important; /* 减小内边距 */
  background: transparent;
  border: none;
  color: #ff7a00 !important;
  cursor: pointer;
  font-size: 13px !important; /* 减小字体大小 */
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 50px; /* 减小最小宽度 */
  text-align: center;
  height: 32px; /* 设置固定高度 */
  line-height: 1; /* 调整行高 */
}

/* 鼠标悬停效果 */
.language-switcher .lang-btn:hover {
  background: rgba(255, 122, 0, 0.1);
  color: #ff7a00 !important;
}

/* 选中状态 */
.language-switcher .lang-btn.active {
  background: #ff7a00 !important;
  color: white !important;
}

/* 移动端语言切换器 */
@media (max-width: 768px) {
  .mobile-nav-right {
    display: flex; /* 让子元素（语言切换器、折叠按钮）横向排列 */
    align-items: center; /* 垂直居中 */
    gap: 8px !important; /* 关键：设置8px的间距 */
  }

  /* 移动端语言切换器 - 变得更小 */
  .mobile-nav .language-switcher {
    margin-right: 0 !important; /* 消除语言切换器右侧的间距 */
    border: 1px solid rgba(255, 122, 0, 0.3);
    border-radius: 12px !important; /* 更小的圆角 */
    overflow: hidden;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    height: 28px !important; /* 更小的高度 */
    transform: scale(0.9); /* 整体缩小一点 */
  }

  /* 移动端语言切换器内的按钮 - 变得更小 */
  .mobile-nav .language-switcher .lang-btn {
    padding: 3px 8px !important; /* 更小的内边距 */
    background: transparent;
    border: none;
    color: #ff7a00 !important;
    cursor: pointer;
    font-size: 10px !important; /* 更小的字体 */
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 25px !important; /* 更小的最小宽度 */
    text-align: center;
    height: 28px !important; /* 与父容器高度一致 */
    line-height: 1;
  }

  .mobile-nav .language-switcher .lang-btn:hover {
    background: rgba(255, 122, 0, 0.1);
    color: #ff7a00 !important;
  }

  .mobile-nav .language-switcher .lang-btn.active {
    background: #ff7a00 !important;
    color: white !important;
  }

  /* 移动端折叠按钮 */
  .mobile-menu-toggle {
    margin: 0 !important; /* 消除折叠按钮的margin */
    background: #ff7a00;
    color: white;
    border: none;
    padding: 10px 14px !important; /* 稍微减小一点 */
    font-size: 11px !important; /* 更小的字体 */
    cursor: pointer;
    border-radius: 6px;
  }
}

/* 超小屏幕进一步优化 */
@media (max-width: 480px) {
  .mobile-nav-right {
    gap: 6px !important; /* 超小屏幕间距更小 */
  }

  .mobile-nav .language-switcher {
    height: 26px !important;
    transform: scale(0.85); /* 更小的缩放 */
  }

  .mobile-nav .language-switcher .lang-btn {
    padding: 2px 6px !important;
    font-size: 9px !important;
    min-width: 22px !important;
    height: 26px !important;
  }

  .mobile-menu-toggle {
    padding: 8px 12px !important;
    font-size: 10px !important;
  }
}

/* 电脑端大屏幕优化 */
@media (min-width: 1200px) {
  .language-switcher .lang-btn {
    font-size: 12px !important; /* 大屏幕可以稍微大一点 */
    padding: 5px 14px !important;
    min-width: 55px;
  }
}

/* 导航栏基础样式 */
.navbar {
  position: static;
  width: 100%;
  z-index: 1000;
  padding: 15px 0;
  transition: all 0.3s ease;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar.scrolled {
  background: #ffffff;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  padding: 12px 0;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

/* 电脑端导航样式 */
.desktop-nav {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: space-between;
}

.desktop-logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
}

.desktop-logo span {
  color: #ff7a00;
  transition: color 0.3s ease;
}

.desktop-logo:hover span {
  color: #e65c00;
}

.desktop-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.desktop-links a {
  color: #333333;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
  padding: 10px 0;
  font-size: 16px;
  white-space: nowrap;
}

.desktop-links a:hover {
  color: #ff7a00;
}

.desktop-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: #ff7a00;
  transition: width 0.3s ease;
}

.desktop-links a:hover::after {
  width: 100%;
}

/* 电脑端下拉菜单 - 修改后的样式 */
.desktop-dropdown {
  position: relative;
  display: inline-block;
}

.desktop-dropbtn {
  text-decoration: none;
  padding: 8px 16px;
  display: inline-block;
}

.desktop-dropdown-content {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: 200px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1001;
  padding: 10px;
  margin-top: 5px;
  border-radius: 8px;
}

/* 新增的下拉菜单项容器 */
.desktop-dropdown-item {
  position: relative;
  margin-bottom: 8px;
}

.desktop-dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  transition: background-color 0.2s;
  border-radius: 4px;
}

.desktop-dropdown-content a:hover {
  background-color: #f5f5f5;
}

/* 二维码样式 - 修改后的定位 */
.desktop-qrcode {
  display: none;
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  width: 80px;
  height: 80px;
  background: white;
  padding: 3px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  z-index: 1002;
  border: 1px solid #eee;
  margin-left: -70px;
}

/* 显示逻辑 - 修改为悬停在项容器上显示 */
.desktop-dropdown:hover .desktop-dropdown-content {
  display: block;
}

.desktop-dropdown-item:hover .desktop-qrcode {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-50%) translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

/* 移动端菜单核心样式 - 保持不变 */
.mobile-nav {
  position: relative;
  z-index: 9999;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
}

.mobile-logo span {
  color: #ff7a00;
  transition: color 0.3s ease;
}

.mobile-logo:hover span {
  color: #e65c00;
}

.mobile-menu-toggle {
  background: #ff7a00;
  color: white;
  border: none;
  padding: 12px 18px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 6px;
  margin: 0;
}

.mobile-nav-content {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #eee;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 20px;
  z-index: 9998;
  max-height: calc(100vh - 70px);
  overflow-y: auto;
}

.mobile-nav-content.active {
  display: block;
}

.mobile-nav-content a {
  display: block;
  color: #333;
  text-decoration: none;
  padding: 12px 0;
  font-size: 16px;
  border-bottom: 1px solid #f5f5f5;
}

.mobile-apps-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 0;
}

.mobile-app-item {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.app-name {
  text-decoration: none;
  color: #333;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-qrcode {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border: 1px solid #eee;
  padding: 3px;
  background: #fff;
}

/* 响应式控制 - 移动端 (≤768px) */
@media (max-width: 768px) {
  .desktop-nav {
    display: none !important;
  }
  .mobile-nav {
    display: flex !important;
  }
  .mobile-menu-toggle {
    display: block !important;
    position: relative;
    z-index: 10000;
  }
}

/* 响应式控制 - 电脑端 (≥769px) */
@media (min-width: 769px) {
  .mobile-nav {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: none !important;
  }
  .desktop-nav {
    display: flex !important;
  }
}
