/* 语言切换器样式 */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 12px;
}

.language-switcher {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.lang-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.35);
}

.lang-btn i:first-child {
  font-size: 14px;
}

.lang-btn i:last-child {
  font-size: 10px;
  transition: transform 0.3s ease;
}

.lang-btn.active i:last-child {
  transform: rotate(180deg);
}

#currentLangText {
  font-size: 13px;
}

/* 下拉菜单 */
.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  max-height: 400px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

/* 自定义滚动条 */
.lang-dropdown::-webkit-scrollbar {
  width: 6px;
}

.lang-dropdown::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

.lang-dropdown::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.lang-dropdown::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

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

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  color: #0f172a;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
  text-align: left;
}

.lang-option:hover {
  background: #f8fafc;
}

.lang-option.active {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  color: #667eea;
  font-weight: 600;
}

.lang-flag {
  font-size: 18px;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .header-top {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  
  .language-switcher {
    order: -1;
    align-self: flex-end;
  }
  
  .lang-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .lang-dropdown {
    right: 0;
  }
}

/* 广告特性项样式优化 */
.ad-feature-item {
  word-break: keep-all;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 320px) {
  .ad-feature-item {
    white-space: normal;
    word-break: break-word;
  }
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
  .lang-dropdown {
    background: #1a1f3a;
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .lang-option {
    color: #e6eaf2;
  }
  
  .lang-option:hover {
    background: rgba(255, 255, 255, 0.05);
  }
}

