/* v1.3 - 2026-05-04 - 确保单行显示，移除与其他站点冲突的样式 */
/* ============================================
   Top Bar - 中文主站专用
   ============================================ */

/* 顶部黑条 - 确保显示 */
.site-top-bar {
  background: #111 !important;
  color: #fff !important;
  font-size: 16px !important;
  line-height: 44px !important;
  position: relative !important;
  display: block !important;
}

/* 容器 - 右对齐，flex 布局 */
.site-top-bar .l-wrap {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  flex-direction: row !important;
}

/* 右侧容器 - 确保水平排列 */
.top-bar-right {
  display: flex !important;
  align-items: center !important;
  gap: 24px !important;
  flex-direction: row !important;
}

/* 语言选择器 */
.lang-selector {
  position: relative !important;
  display: inline-block !important;
}

.lang-current {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  padding: 4px 12px !important;
  border-radius: 4px !important;
  transition: background-color 0.2s !important;
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3) !important;
  letter-spacing: 0.3px !important;
}

.lang-current:hover {
  background: rgba(255,255,255,0.15) !important;
}

.lang-current img.flag {
  width: 20px !important;
  height: 14px !important;
  object-fit: cover !important;
  border-radius: 2px !important;
  display: inline-block !important;
  visibility: visible !important;
}

.lang-current .arrow {
  display: inline-block !important;
  width: 0 !important;
  height: 0 !important;
  border-left: 4px solid transparent !important;
  border-right: 4px solid transparent !important;
  border-top: 4px solid #fff !important;
  margin-left: 6px !important;
}

/* 下拉菜单 - 多列布局 */
.lang-dropdown {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  background: #fff !important;
  border-radius: 4px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15) !important;
  min-width: 460px !important;
  max-height: 300px !important;
  overflow-y: auto !important;
  padding: 6px !important;
  display: none !important;
  z-index: 100001 !important;
  column-count: 3 !important;
  column-gap: 4px !important;
}

.lang-selector.open .lang-dropdown {
  display: block !important;
}

.lang-dropdown a {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 3px 6px !important;
  color: #333 !important;
  text-decoration: none !important;
  font-size: 13px !important;
  transition: background-color 0.15s !important;
  break-inside: avoid !important;
  border-radius: 2px !important;
  line-height: 1.5 !important;
}

.lang-dropdown a:hover {
  background: #e8e8e8 !important;
}

.lang-dropdown img.flag {
  width: 18px !important;
  height: 13px !important;
  object-fit: cover !important;
  border-radius: 1px !important;
  display: inline-block !important;
  visibility: visible !important;
  flex-shrink: 0 !important;
}

/* 联系信息 - 与语言选择器同一行 */
.top-contact {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  flex-direction: row !important;
}

.top-contact a {
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  opacity: 1 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3) !important;
  transition: opacity 0.2s !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.top-contact a:hover {
  opacity: 1 !important;
  text-decoration: underline !important;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .site-top-bar .l-wrap {
    padding: 0 10px !important;
  }
  
  .top-bar-right {
    gap: 12px !important;
  }
  
  .top-contact span {
    display: none !important;
  }
}

/* 调整 header 位置 */
header {
  position: relative !important;
  top: 0 !important;
}

body {
  padding-top: 0 !important;
}

/* ============================================
   最高优先级规则 - 修复字体粗细
   ============================================ */
.site-top-bar,
.site-top-bar * {
  font-weight: 400 !important;
}

.site-top-bar .lang-current,
.site-top-bar .lang-current * {
  font-weight: 400 !important;
  font-size: 16px !important;
}

.site-top-bar .top-contact,
.site-top-bar .top-contact *,
.site-top-bar .top-contact a,
.site-top-bar .top-contact span {
  font-weight: 400 !important;
  font-size: 15px !important;
  font-family: Arial, sans-serif !important;
}
