/* 多语言切换样式优化 */
.lang-box {
    position: relative;
    cursor: pointer;
    font-size: 14px;
    color: #ccc;
    user-select: none;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.lang-current:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: -10px;
    background: #222;
    min-width: 100px;
    display: none;
    flex-direction: column;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 5px 0;
    margin-top: 5px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.lang-box:hover .lang-dropdown {
    display: flex;
}

.lang-dropdown a {
    padding: 8px 15px;
    color: #aaa;
    text-align: left;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
}

.lang-dropdown a:hover {
    background: var(--primary-red, #E63935);
    color: #fff;
}

.lang-dropdown a:first-child {
    border-radius: 3px 3px 0 0;
}

.lang-dropdown a:last-child {
    border-radius: 0 0 3px 3px;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .lang-box {
        font-size: 11px;
    }
    
    .lang-dropdown {
        right: 0;
        min-width: 90px;
    }
    
    .lang-dropdown a {
        padding: 10px 14px;
        font-size: 11px;
    }
}

/* 语言切换动画效果 */
.language-switching {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.language-switched {
    opacity: 1;
}

/* 侧边悬浮栏 */
.sticky-sidebar {
    position: fixed; right: 0; top: 30%; background: #fff; z-index: 999;
    border-top-left-radius: 5px; border-bottom-left-radius: 5px; overflow: hidden;
}
.sidebar-item {
    width: 45px; height: 45px; display: flex; justify-content: center; align-items: center;
    border-bottom: 1px solid #eee; cursor: pointer; color: #333; transition: 0.2s; font-size: 16px;
}
.sidebar-item:hover { background: var(--primary-red); color: #fff; }
@media (max-width: 768px) {
    .sticky-sidebar{
        display: none;
    }
    .logo{
        font-size: 18px !important;
    }
}
/* 为不同语言优化字体 */
[lang="en"] {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

[lang="ru"] {
    font-family: "Helvetica Neue", Helvetica, Arial, "Times New Roman", sans-serif;
}

[lang="es"] {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

[lang="zh-CN"] {
    font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
}

#navbar {
  position: fixed; /* 固定在顶部 */
  top: 0;
  width: 100%;
  height: 70px;
  align-items: center;
  padding: 0 50px;
  z-index: 1000;
  /* 初始状态：透明 */
  background-color: transparent !important;
  transition: background-color 0.3s ease, padding 0.3s ease; /* 顺滑过渡 */
  color: white; /* 假设文字一直是白色 */
}

/* 当滚动后，由 JS 添加这个类 */
#navbar.scrolled {
  background-color: #000 !important; /* 变成黑色（带点透明度更有高级感） */
  box-shadow: 0 2px 10px rgba(0,0,0,0.5); /* 可选：增加一点阴影 */
}
@media (max-width: 768px) {
    #navbar{
        padding: 0 10px;
    }
}