/* ===============================
   语言菜单 lang.css（完整文件）
   =============================== */

/* 整体容器 */
.lang {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 20px;
    cursor: pointer;
    user-select: none;
}
.lang{
  position: fixed !important;
  top: 12px;        /* 你要的顶部距离 */
  right: 25px;      /* ✅ 这就是“离页面右侧边的距离” */
  margin-left: 0 !important;
  z-index: 9999;
}

/* 顶部按钮 */
.lang-icon {
    display: flex;
    align-items: center;
    padding: 4px 6px;
    gap: 6px;
    color: #fff; /* 顶部图标文字默认白色 */
    font-size: 14px;
}

.lang-icon img {
    width: 22px;
    height: 22px;
}

/* “Language” 文本颜色——你的要求：蓝色 */
.lang-icon span {
    position: relative;
    padding-right: 16px;
    color: #4864E2; /* 蓝色文本 */
    font-weight: 700;
}

/* 下拉按钮的小三角 */
.lang-icon span::before,
.lang-icon span::after {
    content: '';
    position: absolute;
    right: 0;
    width: 7px;
    height: 1px;
    background: #fff; /* 白色箭头 */
}

.lang-icon span::before {
    top: 8px;
    transform: rotate(45deg);
}

.lang-icon span::after {
    top: 12px;
    transform: rotate(-45deg);
}

/* 下拉菜单 */
.lang-drop {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border-radius: 6px;
    padding: 6px 0;
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease;
    z-index: 9999;
}

.lang-drop.active {
    opacity: 1;
    visibility: visible;
}

/* 小箭头 */
.lang-arrow {
    position: absolute;
    top: -6px;
    right: 12px;
    width: 10px;
    height: 10px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: -1px -1px 3px rgba(0,0,0,0.08);
}

/* 列表 UL */
.lang-wrap {
    margin: 0;
    padding: 0;
    list-style: none;
}

.lang-wrap li {
    padding: 8px 12px;
}

.lang-wrap li a {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #000;
    text-decoration: none;
}

.lang-wrap li:hover {
    background: #f0f7ff;
}

.lang-wrap li img {
    width: 22px;
    height: 22px;
}

/* ===============================
   ★ 当前语言高亮（配合 a.selected）
   =============================== */

/* 高亮背景（亮科技蓝） */
.lang-wrap li a.selected {
    background: #1668f9 !important;
    color: #fff !important;
    border-radius: 4px;
}



/* 悬停保持高亮 */
.lang-wrap li a.selected:hover {
    background: #1668f9 !important;
}

/* ===============================
   ★ 移动端美化（≤ 768px）
   =============================== */

@media (max-width: 768px) {

    /* 整体更紧凑 */
    .lang {
        margin-left: 12px;
    }

    .lang-icon {
        padding: 6px 8px;
        font-size: 13px;
        gap: 8px;
    }

    .lang-icon img {
        width: 24px;
        height: 24px;
    }

    .lang-icon span {
        padding-right: 18px;
    }

    /* 下拉菜单更大更圆润 */
    .lang-drop {
        top: calc(100% + 6px);
        right: 8px;
        min-width: 220px;
        max-width: calc(100vw - 24px);
        border-radius: 10px;
        padding: 8px 0;
        box-shadow: 0 8px 20px rgba(0,0,0,0.20);
    }

    .lang-arrow {
        right: 18px;
    }

    /* 每项更大，适合手指点击 */
    .lang-wrap li {
        padding: 12px 16px;
    }

    .lang-wrap li a {
        font-size: 15px;
        gap: 10px;
        line-height: 1.4;
    }

    .lang-wrap li img {
        width: 24px;
        height: 24px;
    }

    /* 高亮在手机端也保持统一 */
    .lang-wrap li a.selected {
        border-radius: 6px;
    }
}
