/* 基础样式 */
@font-face {
    font-family: 'LiciumFont2022';
    src: url('./LiciumFont2022-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'LiciumFont2022';
    src: url('./LiciumFont2022-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'LiciumFont2022';
    src: url('./LiciumFont2022-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

:root {
    --border-radius: 20px;
    font-size: 16px;
}
/* Firefox 默认样式 */
html {
    scrollbar-width: thin;
    scrollbar-color: #ddd #f8f8f8;
}

/* Chrome/Safari/Edge 专用 */

::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}


body {
    margin: 0 auto;
    padding: 0;
    font-family: LiciumFont2022, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    max-width: 1323.5px; /*1312+滚动条*/
    overflow: hidden;
    color: rgba(25, 25, 25, 1);
}

/* 顶部header样式 */
.header {
    padding: 20px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.header-container {
    display: flex;
    align-items: baseline;
    /* max-width: 1200px; */
    margin: 0 auto;
    padding: 0 15px;
}

.logo {
    margin-right: 40px;
    font-size: 2rem;
    line-height: 2.75rem;
    font-weight: 500;
}

    .logo img {
        height: 50px;
    }

.header-controls {
    display: flex;
    align-items: center;
    flex-grow: 1;
    /* justify-content: flex-end; 取消靠右*/
}

input, select {
    font-family: LiciumFont2022, sans-serif !important;
}

.model-selector {
    margin-right: 20px;
}

    .model-selector select {
        padding: 8px 15px;
        border: 0px;
        border-radius: var(--border-radius);
        min-width: 200px;
        font-size: 1.25rem;
        background: none;
        font-weight: 500;
        outline: none;
    }

/* 搜索框容器 */
.search-box {
    position: relative;
    width: 300px;
    max-width: 100%;
}

    /* 搜索输入框 */
    .search-box input {
        width: 100%;
        padding: 8px 40px 8px 40px;
        border: 1px solid #ddd;
        border-radius: var(--border-radius);
        box-sizing: border-box;
        font-size: 1.25rem;
    }

/* 搜索图标 */
.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

    .search-icon.search-icon {
        font-size: 1.25rem;
    }
/* 清除按钮 - 修正位置 */
.clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #999;
    cursor: pointer;
    display: none;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    outline: none;
}

/* 输入框有内容时显示清除按钮 */
.search-box input:not(:placeholder-shown) + .clear-btn {
    display: block;
}


.search-box input:focus {
    border-color: #2a5885;
    outline: none;
}

/* 主要内容区样式 */
.main-content {
    display: flex;
    height: calc(100vh - 85px);
    gap: 80px;
}

.sidebar {
    width: 305px;
    /* background-color: #f5f5f5;
    border-right: 1px solid #e7e7e7; */
    overflow-y: auto;
    scrollbar-width:none;
}

.content-area {
    flex: 1;
    padding: 20px 0px;
    overflow-y: auto;
    position: relative;
}

.content-placeholder {
    text-align: center;
    margin-top: 100px;
    color: #999;
    display: none;
}


/* ================= 导航菜单样式 ================= */
.map {
    list-style: none;
    padding: 0;
    margin: 0;
    --indent-base: 1.25rem;
    --active-marker: 2px;
    /* color: rgba(153, 153, 153, 1); */
}

    .map .nav-text {
        color: #000;
    }

    .map .nav-item .nav-item .nav-item .nav-text {
        color: rgba(153, 153, 153, 1);
    }


.nav-item {
    position: relative;
}

    .nav-item > .selected > .nav-text {
        color: #000 !important;
    }

    .nav-item.level-1.active .sub-menu {
        border-left: solid 1px rgba(0, 0, 0, 0.1);
    }



/* 导航链接 - 最终优化版 */
.nav-link {
    display: grid;
    grid-template-columns: 1fr auto; /* 文本 | 箭头 */
    align-items: center;
    padding: 0rem 0rem 0rem calc(var(--active-marker) + var(--indent-base));
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
}

    /* 箭头图标 */
    .nav-link > .iconfont.arrow {
        grid-column: 2;
        justify-self: end;
        font-size: 14px;
        transition: transform 0.3s ease;
        color: rgba(153, 153, 153, 1);
        margin-right: 5px;
    }

    /* 叶子节点 */
    .nav-link.leaf {
        display: block;
        padding-left: calc(var(--active-marker) + var(--indent-base));
    }

.nav-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    grid-column: 1;
}

.map > li > .nav-link > .nav-text {
    font-size: 1.25rem;
    line-height: 2rem;
}

.map > li > .sub-menu > li > .nav-link > .nav-text {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.map > li > .nav-link, .map > li > .sub-menu > li > .nav-link {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
}



.sidebar ul {
    margin-top: 0rem;
    margin-bottom: 0rem;
}



/* 子菜单 */
.sub-menu {
    display: none;
    padding-left: 0;
    list-style: none;
}

/* 活动状态 */
.has-children.active > .nav-link .arrow {
    transform: rotate(90deg);
}

.has-children.active > .sub-menu {
    display: block;
}

.has-children > .nav-link .arrow {
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.has-children.active > .nav-link .arrow {
    transform: rotate(90deg);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 选中状态 */
.nav-link.selected,
.nav-link.leaf.selected {
    /* background-color: rgba(42, 88, 133, 0.05); */
}

    .nav-link.selected::before,
    .nav-link.leaf.selected::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: var(--active-marker);
        background-color: rgba(5, 117, 104, 1);
    }

/* 一级菜单 */
.map > .nav-item > .nav-link {
}

/* 层级缩进 */
.nav-item.level-1 > .nav-link {
    padding-left: calc(var(--active-marker) + var(--indent-base)*1);
}

.nav-item.level-2 > .nav-link {
    padding-left: calc(var(--active-marker) + var(--indent-base)*2);
}

.nav-item.level-3 > .nav-link {
    padding-left: calc(var(--active-marker) + var(--indent-base)*2);
}

.nav-item.level-4 > .nav-link {
    padding-left: calc(var(--active-marker) + var(--indent-base)*2);
}

.nav-link:hover {
    /* background-color: rgba(0, 0, 0, 0.05); */
}

/* 搜索结果样式 */
.search-results {
    display: none;
}

.search-result-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .search-result-item:hover {
        background-color: #f9f9f9;
    }

.search-result-title {
    color: #2a5885;
    font-weight: bold;
    margin-bottom: 5px;
}

.search-result-snippet {
    color: #666;
    font-size: 0.9em;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: #999;
}

.highlight {
    background-color: #ffeb3b;
    padding: 0 2px;
}

/* 错误消息样式 */
.error-message {
    color: #d9534f;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
    border-left: 4px solid #d9534f;
}


/* 导航多行时，箭头需要对齐第一行中间 */

.nav-text {
    white-space: pre-wrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    max-width: 248px;
}

.nav-link > .iconfont.arrow {
    justify-self: end;
    align-self: start;
    padding-top: 0.4rem;
}

.has-children.active > .nav-link .arrow {
    margin-right: 2px;
}


.level-2 > .nav-link > .iconfont.arrow {
    padding-top: 0.35rem;
}