.tool-form-base64-codec > .json-output-toolbar.tool-top-toolbar,
.tool-form-url-codec > .json-output-toolbar.tool-top-toolbar,
.tool-form-md5 > .json-output-toolbar.tool-top-toolbar {
    margin-bottom: 0;
    padding: 0;
    min-height: 0;
}

.tool-form-base64-codec > .form-field:first-of-type,
.tool-form-url-codec > .form-field,
.tool-form-md5 > .form-field {
    margin-bottom: 0;
    margin-top: 0;
}

.tool-form-base64-codec > .form-btn,
.tool-form-url-codec > .form-btn,
.tool-form-md5 > .form-btn {
    margin-top: 10px;
    margin-bottom: 10px;
    justify-content: flex-start;
}

/* 最小化（非全屏）：保持普通纵向布局，不受全屏 flex 影响 */
.tool-form-url-codec:not(.fullscreen) > .form-btn,
.tool-form-md5:not(.fullscreen) > .form-btn,
.tool-form-base64-codec:not(.fullscreen) > .form-btn {
    justify-content: flex-start;
}
.tool-form-url-codec:not(.fullscreen) > .form-field,
.tool-form-md5:not(.fullscreen) > .form-field {
    display: block;
    flex: none;
    height: auto;
}

.tool-form-url-codec:not(.fullscreen) .form-field .form-textarea,
.tool-form-md5:not(.fullscreen) .form-field .form-textarea {
    flex: none;
    height: auto !important;
}

.tool-form-url-codec:not(.fullscreen) > .codec-result-host,
.tool-form-md5:not(.fullscreen) > .codec-result-host {
    flex: none;
    height: auto;
    overflow: visible;
}

.tool-form-url-codec:not(.fullscreen) > .codec-result-host:empty,
.tool-form-md5:not(.fullscreen) > .codec-result-host:empty {
    flex: none;
    min-height: 0;
}

.tool-form-base64-codec.fullscreen > .form-field:first-of-type {
    order: 1;
}

.tool-form-base64-codec.fullscreen > .form-btn {
    order: 2;
    flex-shrink: 0;
    margin-top: 10px;
    margin-bottom: 10px;
    justify-content: center;
}

.tool-form-base64-codec.fullscreen > .form-field ~ .form-field {
    order: 3;
}

.tool-form-base64-codec.fullscreen .form-field {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.tool-form-base64-codec.fullscreen .form-field .form-textarea {
    flex: 1;
    min-height: 0;
    height: auto !important;
}

/* URL / MD5 全屏：输入与结果各占一半，按钮居中 */
.tool-form-url-codec.fullscreen > .form-field,
.tool-form-md5.fullscreen > .form-field {
    order: 1;
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.tool-form-url-codec.fullscreen > .form-btn,
.tool-form-md5.fullscreen > .form-btn {
    order: 2;
    flex: 0 0 auto;
    margin-top: 10px;
    margin-bottom: 10px;
    justify-content: center;
}

.tool-form-url-codec.fullscreen > .codec-result-host,
.tool-form-md5.fullscreen > .codec-result-host {
    order: 3;
    flex: 1 1 0;
    min-height: 0;
    overflow: auto;
    margin-top: 0;
}

.tool-form-url-codec.fullscreen > .codec-result-host:empty,
.tool-form-md5.fullscreen > .codec-result-host:empty {
    flex: 1 1 0;
    min-height: 0;
}

.tool-form-url-codec.fullscreen .form-field .form-textarea,
.tool-form-md5.fullscreen .form-field .form-textarea {
    flex: 1;
    min-height: 0;
    height: 100% !important;
}

.tool-form-base64-codec.fullscreen #tool-tips,
.tool-form-md5.fullscreen #tool-tips {
    order: 4;
    flex-shrink: 0;
}
