.tool-content {
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    border-radius: .6em;
    overflow: hidden;
    position: relative;
    display: flex;
}

/*左侧编辑器*/
.editor {
    flex: 1;
}

.editor .editor-header {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #EBEBEC;
    background-color: var(--main-bg);
}

.editor .editor-header .editor-title {
    margin-left: 15px;
    font-weight: 500;
}

.editor .editor-header .editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-right: 15px;
}

.editor .editor-header .editor-toolbar button {
    width: 32px;
    height: 32px;
    border-radius: 5px;
    background-color: #F4F6F8;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.editor .editor-header .editor-toolbar button:hover {
    background-color: #e9ecef;
    color: #fff;
}

.editor .editor-header .editor-toolbar button.btn-delete:hover {
    background-color: #ff4c4c;
    fill: #fff;
}

.editor .editor-body {
    display: flex;
    flex: 1 1 0;
    height: 555px;
    background-color: #fff;
    overflow-y: auto;
}

.editor .editor-body .line-numbers {
    overflow: hidden;
    padding: 11px 0 16px 8px;
    text-align: right;
    user-select: none;
    flex-shrink: 0;
    color: rgb(79 79 79);
    line-height: 25px;
    font-size: 14px;
}

.editor .editor-body .line-numbers .line-numbers-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 100%;
    padding-right: 3px;
}

.editor .editor-body .line-numbers .line-numbers-inner span {
    font-family: 'Fira Code', 'JetBrains Mono', 'Cascadia Code', 'Consolas', monospace;
}

.editor .editor-body .editor-textarea-wrap {
    flex: 1 1 0;
    background: rgb(255, 255, 255);
    position: relative;
    min-height: 400px;
    overflow: hidden;
}

.editor .editor-body .editor-textarea-wrap textarea {
    font-size: 15px;
    line-height: 25px;
    width: 100%;
    height: 100%;
    min-height: 400px;
    resize: none;
    outline: none;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: none;
    padding: 10px;
    overflow-wrap: break-word;
    color: rgb(31, 31, 31);
}

/*右侧目录栏*/
.editor-operate {
    width: 320px;
    height: 600px;
    background: #fff;
    border-left: solid 1px #e5e5e5;
}

.editor-operate > label {
    font-weight: bold;
    display: block;
    padding-left: 1em;
    font-size: 15px;
    line-height: 43px;
    border-bottom: solid 1px #ddd;
    background-color: var(--main-bg);
}

.menu-list {
    height: calc(100% - 50px);
    overflow-y: auto;
}

.menu-list .menu-item {
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 10px;
    height: 40px;
    cursor: pointer;
    padding: 0 1em;
    color: rgb(31, 31, 31);
    font-size: 14px;
}

.menu-list .menu-item svg {
    fill: #333;
}

.menu-list .menu-item:nth-child(2n) {
    background-color: #f4f6f8;
}

.menu-list .menu-item:hover {
    background-color: #e9ecef;
}

.menu-list .menu-item.active {
    background-color: #0baf5d;
    color: #fff;
}

.menu-list .active svg {
    fill: #fff;
}


/* 暗色模式 - 通过 .dark-mode 类控制 */
.tool-content.dark-mode {
    background: #282a36;
    border-color: #44475a;
}

.tool-content.dark-mode .editor .editor-header {
    background: #21222c;
    border-bottom-color: #44475a;
}

.tool-content.dark-mode .editor .editor-header .editor-title {
    color: #f8f8f2;
}

.tool-content.dark-mode .editor .editor-header .editor-title:hover {
    background-color: #44475a;
    border: solid 1px #44475a;
}

.editor .editor-header .editor-title .title-edit-input {
    font-size: inherit;
    font-weight: 500;
    font-family: inherit;
    background: transparent;
    border: none;
    border-bottom: 2px solid #0baf5d;
    outline: none;
    padding: 0 4px;
    color: inherit;
    min-width: 100px;
    max-width: 300px;
}


.tool-content.dark-mode .editor .editor-header .editor-toolbar button {
    background-color: #44475a;
}

.tool-content.dark-mode .editor .editor-header .editor-toolbar button:hover{
    background-color: #64677a;
}

.tool-content.dark-mode .editor .editor-header .editor-toolbar button.btn-download:hover {
    background-color: #0DC268;
    fill: #fff;
}

.tool-content.dark-mode .editor .editor-header .editor-toolbar button.btn-delete:hover {
    background-color: #ff4c4c;
    fill: #fff;
}

.tool-content.dark-mode .editor .editor-header .editor-toolbar button svg path {
    fill: #f8f8f2;
}

.tool-content.dark-mode .editor .editor-body {
    background-color: #282a36;
}

.tool-content.dark-mode .editor .editor-body .line-numbers {
    background-color: #282a36;
    color: #6272a4;
}

.tool-content.dark-mode .editor .editor-body .editor-textarea-wrap {
    background-color: #282a36;
}

.tool-content.dark-mode .editor .editor-body .editor-textarea-wrap textarea {
    background-color: transparent;
    color: #f8f8f2;
}

.tool-content.dark-mode .editor-operate {
    background: #21222c;
    border-left-color: #44475a;
}

.tool-content.dark-mode .editor-operate > label {
    color: #f8f8f2;
    border-bottom-color: #44475a;
    background-color: #21222c;
}

.tool-content.dark-mode .menu-list .menu-item {
    color: #abb2bf;
}

.tool-content.dark-mode .menu-list .menu-item:nth-child(2n) {
    background-color: #282a36;
}

.tool-content.dark-mode .menu-list .menu-item:hover {
    background-color: #373743;
}

.tool-content.dark-mode .menu-list .menu-item.active {
    background-color: #0dc268;
    color: #fff;
}

.tool-content.dark-mode .menu-list .menu-item svg {
    fill: #abb2bf;
}

.tool-content.dark-mode .menu-list .menu-item.active svg {
    fill: #fff;
}


/* 全屏模式 */
.tool-content.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
    z-index: 9999;
}

.tool-content.fullscreen .editor .editor-body {
    height: 100vh;
    flex: 1;
}

.tool-content.fullscreen .editor-operate {
    height: 100vh;
}

.tool-content.fullscreen .editor .editor-body .editor-textarea-wrap textarea {
    min-height: 100%;
}

/* 标题编辑样式 */
.editor .editor-header .editor-title{
    cursor: pointer;
    position: relative;
    transition: padding 0.2s;
    user-select: none;
    outline: none;
}

.editor .editor-header .editor-title:hover {
    padding: 3px 10px;
    border-radius: 5px;
    background-color: #ffffff;
    border: solid 1px rgb(223 220 255);
}

.editor .editor-header .editor-title .title-edit-input {
    font-size: inherit;
    font-weight: 500;
    font-family: inherit;
    background: transparent;
    border: none;
    border-bottom: 2px solid #0baf5d;
    outline: none;
    padding: 0 4px;
    color: inherit;
    min-width: 100px;
    max-width: 300px;
}

@media (max-width: 768px) {
    .tool-content {
        border-width: 0;
        flex-direction: column;
        box-shadow: none;
    }

    .album-wrapper {
        border: solid 1px #ddd;
        padding: 1em;
    }

    .album-operate {
        border: solid 1px #e5e5e5;
        width: calc(100% - 2px);
        padding-bottom: 1em;
    }

    .menu-operate .input-group > label {
        min-width: 54px;
    }

    .btn-download {
        margin-left: 64px;
    }
}