.layer-tree-container {
    position: absolute;
    left: 20px;
    top: 20px;
    width: 280px;
    background: rgba(38, 38, 38, 0.95);
    color: #fff;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.layer-tree-container.collapsed {
    left: -250px;
}

.tree-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px 8px 0 0;
}

.tree-header-title {
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.toggle-btn .icon {
    transition: transform 0.3s ease;
    color: rgba(255, 255, 255, 0.9);
}

.layer-tree-container.collapsed .toggle-btn .icon {
    transform: scaleX(-1);
}

.tree-content {
    padding: 12px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* 滚动条样式 */
.tree-content::-webkit-scrollbar {
    width: 4px;
}

.tree-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.tree-content::-webkit-scrollbar-track {
    background: transparent;
}

/* 树节点基础样式 */
.n-tree-node {
    margin: 2px 0;
}

/* 树节点文字基础样式 */
.n-tree-node-content__text {
    flex: 1;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9) !important;
}

/* 父节点样式 */
.n-tree-node-content--parent {
    font-weight: 500 !important;
    background-color: rgba(46, 204, 113, 0.1) !important;
    border-radius: 6px;
    margin-bottom: 8px !important;
    padding: 10px 8px !important;
    backdrop-filter: blur(5px);
}

/* 子节点样式 */
.n-tree-node-content--child {
    padding: 8px 8px !important;
    margin: 4px 0 !important;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.02) !important;
}

/* 展开/折叠图标 */
.n-tree-node-content__prefix {
    color: #2ecc71 !important;
}

/* 移除复选框相关样式 */
.n-checkbox {
    display: none !important;
}

/* 调整节点内容布局 */
.n-tree-node-content {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 4px !important;
    padding-left: 8px !important;
}

/* 开关容器样式 */
.switch-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: 4px !important;
    width: 40px;
}

/* 开关基础样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

/* 隐藏原始复选框 */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* 开关滑块样式 */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: .3s;
    border-radius: 20px;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

/* 开关圆形按钮 */
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 1px;
    bottom: 1px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 开关选中状态 */
input:checked + .slider {
    background-color: #2ecc71;
    border-color: #27ae60;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* 开关悬浮效果 */
.slider:hover {
    border-color: #2ecc71;
}

input:checked + .slider:hover {
    background-color: #27ae60;
}

/* 禁用所有悬浮和选中状态的样式 */
.n-tree-node:hover .n-tree-node-content,
.n-tree-node--selected .n-tree-node-content,
.n-tree-node--selected:hover .n-tree-node-content,
.n-tree-node .n-tree-node-content--selected,
.n-tree-node .n-tree-node-content:hover,
.n-tree-node .n-tree-node-content:active,
.n-tree-node .n-tree-node-content.n-tree-node-content--selected {
    background-color: transparent !important;
}

/* 保持文字颜色不变 */
.n-tree-node:hover .n-tree-node-content .n-tree-node-content__text,
.n-tree-node--selected .n-tree-node-content .n-tree-node-content__text,
.n-tree-node--selected:hover .n-tree-node-content .n-tree-node-content__text,
.n-tree-node .n-tree-node-content--selected .n-tree-node-content__text,
.n-tree-node .n-tree-node-content:hover .n-tree-node-content__text,
.n-tree-node .n-tree-node-content:active .n-tree-node-content__text {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* 禁用naive-ui的所有默认背景色 */
.n-tree .n-tree-node-content,
.n-tree .n-tree-node-content:hover,
.n-tree .n-tree-node-content:active,
.n-tree .n-tree-node-content--selected,
.n-tree .n-tree-node-content.n-tree-node-content--selected:hover {
    background-color: transparent !important;
}

/* 子节点和父节点的固定背景色 */
.n-tree-node-content--parent {
    background-color: rgba(46, 204, 113, 0.1) !important;
}

.n-tree-node-content--child {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

/* 修改图标样式 */
.icon {
    font-size: 18px;
    line-height: 1;
    display: inline-block;
    font-family: "Arial", sans-serif;
    font-weight: bold;
}

.tree-header-title .icon {
    color: #2ecc71;
    margin-right: 8px;
}

.toggle-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.toggle-btn .icon {
    transition: transform 0.3s ease;
    color: rgba(255, 255, 255, 0.9);
}

/* 修改收缩状态的箭头旋转 */
.layer-tree-container.collapsed .toggle-btn .icon {
    transform: scaleX(-1);
}

/* 移除之前的 Font Awesome 相关样式 */
.tree-header-title i,
.toggle-btn i {
    display: none;
}