.json-formatter {
    padding-top: 60px;
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

.maximized .json-formatter {
    padding-top: 0;
    height: 100vh;
}

.editor-wrapper {
    margin: 0 auto;
    width: 95%;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-bottom: 20px;
}

.toolbar {
    padding: 0px 20px;
    background-color: inherit;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 20px;
    z-index: 100;
}

.toolbar h1 {
    margin: 0;
    font-size: 1.5em;
}

.editor-container {
    flex: 1 1 auto;
    display: flex;
    position: relative;
    overflow: hidden;
    margin-top: 3px;
    min-height: calc(100vh - 250px);
}

.editor-pane {
    flex: 1 0 0%;
    min-width: 10%;
    max-width: 90%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

#json-input {
    flex: 1;
    width: 98%;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    font-family: monospace;
    resize: none;
    min-height: 96%;
    overflow-y: auto;
    overflow-x: hidden;
}

#json-output {
    flex: 1;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 96%;
    overflow-y: auto;
    overflow-x: hidden;
}

/* 最大化模式 - 内容区域占满侧边栏右侧空间 */
body.maximized {
    overflow: hidden;
}

body.maximized .json-formatter {
    padding-top: 0;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
}

body.maximized .editor-wrapper {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body.maximized .toolbar {
    top: 0;
}

body.maximized .editor-container {
    min-height: calc(100vh - 60px);
    height: calc(100vh - 60px);
    overflow: hidden;
}

.navbar {
    margin-bottom: 0;
}

body.dark-mode .toolbar {
    border-bottom-color: #444;
}

body.dark-mode #json-input,
body.dark-mode #json-output {
    border-color: #444;
    background-color: #1e1e1e;
    color: #fff;
}

.dragbar {
    width: 4px;
    background-color: #ddd;
    cursor: col-resize;
    position: relative;
    z-index: 10;
    transition: background-color 0.3s;
    flex: 0 0 4px;
}

.dragbar:hover {
    background-color: #007AFF;
}

body.dark-mode .dragbar:hover {
    background-color: #0A84FF;
}

.buttons button {
    margin: 0 5px;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: #007AFF;
    color: white;
    transition: all 0.3s ease;
}

.buttons button:hover {
    background-color: #0056b3;
}

body.dark-mode .buttons button {
    background-color: #0A84FF;
}

body.dark-mode .buttons button:hover {
    background-color: #0056b3;
}

footer {
    position: relative;
    width: 100%;
    padding: 15px 0;
    background-color: inherit;
    text-align: center;
    border-top: 1px solid #ddd;
}

/* body.sidebar-open main{
    padding-top: 0px;
} */


/* JSON Editor 树形模式样式优化 */
#json-output .jsoneditor-contextmenu {
    z-index: 1000;
}

/* 删除按钮高亮样式 */
#json-output .jsoneditor-remove {
    color: #dc3545 !important;
}

#json-output .jsoneditor-remove:hover {
    background-color: #dc3545 !important;
    color: white !important;
}

/* 节点悬停效果 */
#json-output .jsoneditor-tree tr:hover {
    background-color: rgba(0, 122, 255, 0.1);
}

body.dark-mode #json-output .jsoneditor-tree tr:hover {
    background-color: rgba(10, 132, 255, 0.2);
}

/* 提示文字样式 */
.editor-tip {
    font-size: 12px;
    color: #666;
    padding: 5px 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-left: 10px;
}

body.dark-mode .editor-tip {
    background-color: #2d2d2d;
    color: #aaa;
}


/* 精简结构按钮高亮样式 */
.buttons .btn-highlight {
    background-color: #28a745 !important;
}

.buttons .btn-highlight:hover {
    background-color: #218838 !important;
}

body.dark-mode .buttons .btn-highlight {
    background-color: #34c759 !important;
}

body.dark-mode .buttons .btn-highlight:hover {
    background-color: #2db84d !important;
}
