/* topright.css */
.right-top-component {
    position: fixed;
    top: 0;
    height: 61px;
    right: 300px;
    background-color: transparent;
    z-index: 1010;
    display: flex;
    align-items: center;
    justify-content: right;
}

/* 当元素被移动后应用的新样式 */
#top-nav .right-top-component {
    position: static; /* 覆盖 fixed，使其回归文档流 */
    top: auto;
    right: auto;
    z-index: auto;
}

.setting-link {
    text-decoration: none;
    display: flex;
    align-items: center;
}
.user-menu {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.user-icon {
    margin-left: 5px;
    font-size: 24px;
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 0;
    width: auto; /* 允许宽度自适应 */
    max-width: 100px; /* 设置最大宽度，防止过长 */
    white-space: nowrap;
    min-width: max-content;
}
.dropdown-menu a {
    display: block;
    padding: 5px 10px !important;
    text-decoration: none;
    color: #333;
}
.dropdown-menu a:hover {
    background-color: #f5f5f5;
}
#username {
    font-size: 18px;
    font-weight: 700;
    font-family: SourceHanSansCN-Regular, "Source Han Sans", 思源黑体, "Noto Sans CJK SC", "Noto Sans CJK TC", sans-serif;

    margin-left: 20px;
    text-decoration: none;
    display: flex;
    align-items: center !important;
}

.language-toggle {
    font-size: 18px;
    font-weight: 700;
    font-family: SourceHanSansCN-Regular, "Source Han Sans", 思源黑体, "Noto Sans CJK SC", "Noto Sans CJK TC", sans-serif;

    margin-right: 20px;
    text-decoration: none;
    cursor: pointer;
}

.setting-link,
#username,
.language-toggle {
    color: black !important;
    white-space: nowrap; /* 防止自动换行 */
}

/* ---- Conditional Styles ---- */

/* Applied when it is NOT a top-level build */
.not-top-build .language-toggle {
    font-size: 16px;
    font-weight: 400;
    font-family: Lato, proxima-nova, Helvetica Neue, Arial, sans-serif;
    margin-right: 0;
    color: #404040;
}

/* Applied when it IS a top-level build */
.top-build .setting-link {
    padding-right: 20px;
}