﻿/* 自定义滚动条 */
/* 滚动条整体样式 */
::-webkit-scrollbar {
    width: 8px;
    /* 滚动条宽度 */
    height: 2px;
    /* 滚动条高度 */
}

/* 滚动条轨道 */
::-webkit-scrollbar-track {
    height: 2px;
    background: #fff;
    /* 轨道背景色 */
    border-radius: 10px;
    /* 轨道圆角 */
    transition: background-color 0.3s ease, opacity 0.3s ease;
    /* 过渡效果 */
    /* 过渡效果 */
    opacity: 0;
    /* 初始状态下透明 */
}

/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
    height: 2px;
    background: #A2A6AB;
    /* 滑块颜色 */
    border-radius: 10px;
    /* 滑块圆角 */
    transition: background-color 0.3s ease, opacity 0.3s ease;
    /* 过渡效果 */
    /* 过渡效果 */
    opacity: 0;
    /* 初始状态下透明 */
}

/* 鼠标悬停时显示滚动条 */
.content:hover ::-webkit-scrollbar-track,
.content:hover ::-webkit-scrollbar-thumb,
.sidebar:hover ::-webkit-scrollbar-track,
.sidebar:hover ::-webkit-scrollbar-thumb {
    opacity: 1;
    /* 悬停时不透明 */
}

/* 滑块悬停样式 */
::-webkit-scrollbar-thumb:hover {
    background: #A2A6AB;
    transition: background-color 0.3s ease, opacity 0.3s ease !important;
    /* 过渡效果 */
    /* 悬停时滑块颜色 */
}

.syntaxhighlighter {
    padding: 10px 0;
    /*width:100%;*/
    border-radius: 5px;
}

.list-paddingleft-2 {
    /* padding-left: 20px !important; */
}

p {
    font-size: 16px;
}

h4 {
    font-size: 32px;
}

.doc-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
}

.title {
    font-size: 1.5rem;
}

li::marker {
    font-size: 1.5rem !important;
    padding-left: 5px;
}

.line {
    padding: 12px 0;
    border-bottom: 2px solid #c5c7c9e3;
    width: 100%;
}

ul {
    list-style: none;
}

body,
html {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

#menu li::marker {
    content: attr(data-index) '. ';
    /* 使用 data-index 属性作为标记 */
    color: #666;
    /* 自定义标记颜色 */
    font-size: 14px !important;
    /* 自定义标记大小 */
}

.main-container {
    display: flex;
    height: 100%;
    /* margin-top: 40px; */
    overflow: hidden;
}


.sidebar {
    width: 400px;
    /* 固定宽度 */
    padding-left: 20px;
    position: relative;
    height: 95vh;
    transition: width 0.3s ease;
}

.content {
    flex: 1;
    /* 占据剩余空间 */
    padding: 20px;
    overflow-y: auto;
    height: 100vh;
    max-height: 100%;
}

.tree-menu {
    list-style-type: none;
    padding-left: 0;
    max-height: 100%;
    /* 确保菜单可以滚动 */
    overflow-y: auto;
    /* 允许滚动 */
}

.tree-menu .toggle {
    cursor: pointer;
    display: block;
    padding: 5px;
    margin-bottom: 2px;
}

.tree-menu li {
    font-size: 15px;
    cursor: pointer;
    padding: 5px;
    margin-bottom: 2px;
    letter-spacing: .3px;
}

.tree-menu .nested {
    padding-left: 20px;
    margin: 10px 0;
}

.tree-menu .nested li {
    width: 250px;
    font-size: 14px;
    cursor: pointer;
    color: #666;
}

.tree-menu li:hover {
    color: rgb(0, 81, 255);
}






/* 表格 */


.table_doucument {
    min-width: 740px;
    border-collapse: collapse;
    font-size: 16px;
    text-align: left;
}

tr:hover {
    background-color: rgb(248, 248, 248);
    /* 悬停时的背景颜色 */
    transition: background-color 0.3s ease;
    /* 过渡效果 */
}

.table_doucument th,
.table_doucument td {
    border: 1px solid #ddd;
    padding: 8px;
}

.table_doucument th {
    background-color: rgba(64, 158, 255, .1);
    font-weight: bold;
}



/* 自定义滚动条 */
.table_doucument::-webkit-scrollbar {
    height: 8px;
}

.table_doucument::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.table_doucument::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.table_doucument::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 右侧阴影效果 */
.table_doucument::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 100%;
    box-shadow: -5px 0 5px -5px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    display: none;
}

.table-container:hover::after {
    display: block;
}


/* 图片显示效果 */
.image-container {
    cursor: pointer;
    max-width: 50% !important;
    /* 设置容器宽度 */
    height: auto;
    /* 设置容器高度 */
    overflow: hidden;
    /* 初始隐藏滚动条 */
}

.image-container:hover {
    overflow: auto;
    /* 鼠标悬停时显示滚动条 */
}

/* 自定义滚动条 */
.image-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.image-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.image-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.image-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 弹框 */


.image-container img {
    height: auto;
}

/* 弹框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 80%;
    max-height: 80%;
    display: block;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}


h1,
h2,
h3 {
    color: #333;
}

p {
    line-height: 1.6;
}

.menu-button {
    display: none;
    cursor: pointer;
    font-size: 24px;
    padding: 5px 10px;
    background-color: #333;
    color: #fff;
    position: fixed;
    top: 2%;
    left: 10px;
    z-index: 1001;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        top: 0;
        left: 0;
        width: 300px;
        height: 100%;
        background-color: #fff;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
        z-index: 1000;

    }
    .content{
        flex: 1;
    }
    .tree-menu .nested li {
        width: none !important;
    }

    .tree-menu .toggle {
        cursor: pointer;
        display: block;
        padding: 5px 0 5px 40px;
        margin-bottom: 2px;
    }

    .menu-button {
        display: block;
    }

    .sidebar.open {
        transform: translateX(0);
    }

}