:root {
    --primary-color: #409EFF;
    --success-color: #67C23A;
    --warning-color: #E6A23C;
    --danger-color: #F56C6C;
    --info-color: #909399;
    --text-primary: #303133;
    --text-regular: #606266;
    --text-secondary: #909399;
    --border-color: #DCDFE6;
    --bg-color: #F5F7FA;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 12px;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    height: 100vh;
}

.sidebar-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    background: #ffffff;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
}

.sidebar-title:before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 18px;
    background: var(--primary-color);
    margin-right: 10px;
    border-radius: 2px;
}

.tree-container {
    padding: 8px;
    overflow-y: auto;
    height: calc(100vh - 140px);
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #c0c4cc #f5f7fa;
    -ms-overflow-style: none;
}

.el-aside {
    overflow: hidden;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tree-container::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
    background: transparent;
}

.custom-tree-node {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    padding: 4px 4px;
    min-height: 26px;
    line-height: 1.4;
}

.node-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.node-icon {
    margin-right: 8px;
    font-size: 14px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    color: #000;
}

.node-badge {
    color: #67C23A;
    font-size: 10px;
    line-height: 10px;
    margin-right: 4px;
    flex-shrink: 0;
    border-radius: 4px;
}

.el-tree {
    background: transparent;
}

.el-tree-node__content {
    height: auto !important;
    min-height: 36px;
    margin: 2px 0;
    border-radius: 4px;
}

.el-tree-node__content:hover {
    background-color: #f5f7fa;
}

.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
    background-color: #ecf5ff;
}

.breadcrumb-container {
    padding: 12px 12px 12px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.breadcrumb-left {
    display: flex;
    align-items: center;
}

.custom-breadcrumb {
    display: flex;
    align-items: center;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--text-regular);
}

.breadcrumb-item:not(:last-child):after {
    content: "/";
    margin: 0 10px;
    color: var(--text-secondary);
}

.breadcrumb-item:last-child {
    color: var(--primary-color);
    font-weight: 600;
}

.breadcrumb-icon {
    margin-right: 6px;
    font-size: 16px;
    color: #000;
}

.main-layout {
    display: flex;
    height: 100%;
    overflow: visible;
    min-height: 0;
    min-width: 0;
}

.left-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 0;
    box-sizing: border-box;
    min-width: 0;
}

.api-test-content {
    height: 100%;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
    min-width: 0;
}

.param-scroll-wrapper {
    overflow-y: auto;
    overflow-x: auto;
    padding-right: 0;
    margin-right: 0;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #c0c4cc #f5f7fa;
    box-sizing: border-box;
    height: 100%;
}

.param-scroll-wrapper::-webkit-scrollbar {
    width: 8px;
}

.param-scroll-wrapper::-webkit-scrollbar-track {
    background: #f5f7fa;
}

.param-scroll-wrapper::-webkit-scrollbar-thumb {
    background: #c0c4cc;
    border-radius: 4px;
}

.param-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: #909399;
}

.el-tabs__header {
    padding-top: 4px;
    margin: 0;
}

.el-tabs--card > .el-tabs__header .el-tabs__nav {
    min-height: 60px;
}

.el-tabs__item {
    height: 60px;
    line-height: 60px;
}

.el-tabs__nav-next, .el-tabs__nav-prev {
    line-height: 60px;
}

.el-tabs__nav-wrap {
    padding-left: 6px;
}

.el-input--suffix .el-input__inner {
    font-size: 12px;
}

.section {
    background-color: #fff;
    overflow-x: auto;
    overflow-y: visible;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.section-header {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 30px;
    background-color: #ffffff;
}

.section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 8px;
    color: #000;
    font-size: 14px;
}

.section-content {
}

.operation-buttons {
    gap: 8px;
}

.el-table--border .el-table__cell:first-child .cell {
    width: 45px;
}

.json-view-pre {
    margin: 0;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: #fafafa;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--info-color);
    flex-direction: column;
    padding: 40px;
}

.result-tabs-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.result-panel-container {
    position: fixed;
    bottom: 0;
    right: 0;
    background-color: #fff;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    min-height: 150px;
    max-height: 80vh;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.result-panel-resizer {
    height: 8px;
    cursor: row-resize;
    background-color: #f5f7fa;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
    transition: background-color 0.2s;
}

.result-panel-resizer:hover {
    background-color: #e4e7ed;
}

.resizer-handle {
    width: 60px;
    height: 4px;
    background-color: #c0c4cc;
    border-radius: 2px;
    transition: background-color 0.2s;
}

.result-panel-resizer:hover .resizer-handle {
    background-color: var(--primary-color);
}

.result-panel-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.result-panel-tabs-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    padding: 0;
}

.result-panel-tabs {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.result-panel-tabs .el-tabs__content {
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.result-panel-tabs .el-tab-pane {
    height: 100%;
    overflow: hidden;
}

.result-tab-content {
    height: 100%;
    overflow-y: auto;
    overflow-x: auto;
    padding: 6px;
    box-sizing: border-box;
}

.result-tab-content-demo {
    position: relative;
    height: 100%;
    overflow: hidden;
}

.result-tab-content-demo:hover .demo-code-copy-hint {
    opacity: 1;
    pointer-events: auto;
}

.demo-code-copy-hint {
    position: absolute;
    top: 10px;
    right: 30px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
    opacity: 0;
    pointer-events: none;
}

.demo-code-copy-hint:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translateY(-1px);
}

.demo-code-copy-hint i {
    font-size: 14px;
}

.tree-highlight {
    background-color: #fff8e1;
    color: var(--warning-color);
    font-weight: 500;
    padding: 2px 4px;
    border-radius: 3px;
}

.base-info-descriptions {
    margin-bottom: 0;
}

.base-info-descriptions .el-descriptions__body {
    background: transparent;
}

.base-info-descriptions .el-descriptions__cell {
    padding-bottom: 8px;
}

.base-info-descriptions .el-descriptions__label {
    color: var(--text-regular);
    font-weight: 500;
}

.base-info-descriptions .el-descriptions__content {
    color: var(--text-primary);
}

.el-dialog__body {
    padding: 0;
}

.security-config-section {
    margin-top: 20px;
}

.security-config-header {
    background-color: #f5f7fa;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.security-config-header i {
    margin-right: 8px;
    color: var(--primary-color);
}

.security-config-content {
    padding: 0 16px 0 0;
}

.security-key-textarea {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 12px;
}

.config-tips {
    margin-top: 8px;
    margin-left: 24px;
    font-size: 12px;
    color: var(--text-secondary);
}

.name-input-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remark-tooltip {
    white-space: pre-line;
    max-width: 300px;
    line-height: 1.5;
}

.el-table {
    font-size: 12px;
}

.el-descriptions {
    font-size: 12px;
}

.el-switch__label * {
    font-size: 12px;
}

.right-sidebar {
    width: 560px;
    background-color: #fff;
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease, transform 0.3s ease;
    z-index: 100;
}

.right-sidebar.collapsed {
    width: 0;
    transform: translateX(100%);
}

.el-aside.collapsed {
    transform: translateX(-100%);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.el-aside {
    background-color: #fff;
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease, transform 0.3s ease;
    z-index: 100;
}
.sidebar-header {
    padding: 13px 16px;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 30px;
}

.sidebar-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    flex: 1;
}

.sidebar-title i {
    margin-right: 8px;
    color: var(--primary-color);
    font-size: 14px;
}

.sidebar-actions {
    display: flex;
    gap: 8px;
}

.sidebar-actions .el-button {
    padding: 4px;
    min-height: auto;
}

.sidebar-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.demo-code-container {
    flex: 1;
    overflow: auto;
    background-color: #ffffff;
}

.demo-code-pre {
    margin: 0;
    padding: 0;
    border: none;
    overflow: auto;
    border-radius: 4px;
    background: #1B1B1B;
    height: 100%;
    box-sizing: border-box;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #c0c4cc #f5f7fa;
}

.demo-code-pre code {
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.6;
    display: block;
    white-space: pre;
    word-wrap: normal;
    overflow-wrap: normal;
    tab-size: 4;
    -moz-tab-size: 4;
    margin: 0;
    padding: 20px;
}

.demo-code-pre code[class*="language-"] {
    padding: 20px;
    display: block;
}

.collapse-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    border-radius: 4px;
    transition: all 0.3s;
}

.collapse-handle:hover {
    background-color: #f5f7fa;
    color: var(--primary-color);
}

.collapse-handle i {
    margin-right: 4px;
    font-size: 14px;
}

.demo-code-container::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.demo-code-container::-webkit-scrollbar-track {
    background: #fafafa;
}

.demo-code-container::-webkit-scrollbar-thumb {
    background: #909399;
    border-radius: 6px;
}

.demo-code-container::-webkit-scrollbar-thumb:hover {
    background: #909399;
}

.demo-code-container::-webkit-scrollbar-corner {
    background: #fafafa;
}

.section-header .el-button--text {
    color: var(--primary-color);
    font-weight: 500;
    padding: 0 8px;
}

.section-header .el-button--text:hover {
    color: #66b1ff;
    background-color: rgba(64, 158, 255, 0.1);
}

.section-header i.el-icon-plus {
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s;
}

.section-header i.el-icon-plus:hover {
    background-color: rgba(64, 158, 255, 0.1);
    color: #66b1ff;
}

@media (max-width: 1200px) {
    .right-sidebar {
        width: 350px;
    }
}

@media (max-width: 992px) {
    .right-sidebar {
        width: 300px;
    }
}