.tool-content {
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    padding: 1.2em;
    border-radius: .6em;
    position: relative;
}

.tool-content .item-format {
    display: flex;
    flex-direction: column;
    gap: 1.2em;
    font-family: var(--font-simple);
}

.tool-content .item-select{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.2em 2em;
    flex-direction: row;
    margin: 1.2em 0;
    border-bottom: solid 1px #ddd;
    padding-bottom: 1.2em;
}

.tool-content .item-select .options{
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.tool-content .item-select .options .custom-select{
    position: relative;
}

/*下拉框*/
.tool-content .item-select .options .custom-select button{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 8px;
    gap: 0 6px;
}

.tool-content .item-select .options .select-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: max-content;
    min-width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 7px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    list-style: none;
    margin: 0;
    padding: 2px 0;
    white-space: nowrap;
}

.select-dropdown li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin: 3px 5px;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    color: #333;
    font-size: 13.7px;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

/* hover 背景 */
.select-dropdown li:hover,
.select-dropdown li[aria-selected="true"] {
    background-color: #f5f5f5;
}

.select-dropdown li .check-icon {
    flex: 0 0 15px; /* 不缩放，固定宽高 */
    width: 15px;
    height: 15px;
    opacity: 0;
    display: block !important;
}

/* 默认选中项始终显示对勾 */
.select-dropdown li[aria-selected="true"] .check-icon {
    opacity: 1;
}

.tool-content .operate-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1.2em;
}

.options-checkbox{
    cursor: pointer;
    overflow: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.input-checkbox {
    appearance: none; /* 移除默认样式 */
    -webkit-appearance: none;
    border: solid 1px #ddd;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    outline: none;
    position: relative;
    cursor: pointer;
}

.input-checkbox:hover {
    border: solid 1px #5a4df8;
    background-color: #f8f7fd;
    box-shadow: inset 0 1px 4px rgba(90, 77, 248, 0.2), 0 0 0 2px rgba(90, 77, 248, 0.1);
}

/* 选中状态添加对钩 */
.input-checkbox:checked::after {
    content: '✔';
    font-size: 14px;
    color: #5a4df8;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/*按钮样式*/
.btn {
    outline: none;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 12px;
    color: #333;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);
    font-family: var(--font-simple);
}

.btn .ripple {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    z-index: 1;
    animation: ripple-effect 0.6s ease-out forwards;
}

.btn svg {
    width: 0.92em;
    height: 0.92em;
}

.btn-blue{
    color: #409EFF;
    background-color: #ecf5ff;
    border-color: #b3d8ff;
}

.btn-blue svg{
    fill: #409EFF;
}

.btn-grey{
    color: #555;
    background-color: #f4f4f5;
    border-color: #d3d4d6;
}

.btn-grey svg{
    fill: #555;
}

.btn-orange{
    color: #E6A23C;
    background: #fdf6ec;
    border-color: #f5dab1;
}

.btn-orange svg{
    fill: #E6A23C;
}

.btn-green{
    color: #67C23A;
    background: #f0f9eb;
    border-color: #c2e7b0;
}

/* 关键动画：扩散 + 淡出 */
@keyframes ripple-effect {
    0% {
        width: 0;
        height: 0;
        opacity: 0.4;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* ==================== 图片上传框 ==================== */
.code-upload {
    border: solid 1px #ddd;
    background-color: var(--main-bg);
    min-width: 100%;
    max-width: 100%;
    width: 100%;
    min-height: 400px;
    line-height: 30px;
    padding: 0 12px;
    border-radius: 7px;
    font-family: var(--font-simple);
    outline: none;
    font-size: 15px;
    color: #6c6c6c;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px 0;
    cursor: pointer;
    position: relative;
}

.file-info{
    position: absolute;
    right: 1.7em;
    top: 1.5em;
    font-family: Noto Sans SC,Arial,sans-serif;
    display: none;
    font-weight: 600;
    font-size: 13px;
}

.file-info span{
    font-size: 13px;
    color: #526172;
}

/* 拖拽时高亮 */
.code-upload.dragover {
    border-color: #5a4df8;
    background-color: #f0edff;
    color: #5a4df8;
}

.code-upload .upload-prompt{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px 0;
}

#previewContainer{
    padding: 20px 10px;
}

.code-upload img {
    max-width: 80%;
    max-height: 600px;
    background: url("../images/transparent.png") repeat;
    background-size: 20px;
    margin: auto;
}

/* ==================== 尺寸选择框 ==================== */
.icon-size-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.size-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
    position: relative;
}

.size-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* 外圈 - 圆形边框 */
.size-item::before {
    content: '';
    position: relative;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border: 1.5px solid #adb5bd;
    border-radius: 50%;
    background-color: white;
    transition: all 0.2s ease;
    z-index: 1;
}

.size-item.active::before {
    border-color: rgba(90, 77, 248, 0.9);
}

/* 内点 - 默认不显示，active 时出现 */
.size-item::after {
    content: '';
    position: absolute;
    left: 16px;
    width: 10px;
    height: 10px;
    background-color: rgba(90, 77, 248, 0.9);
    border-radius: 50%;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.size-item.active::after {
    opacity: 1;
}

.size-label {
    color: #212529;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

.size-item.active .size-label {
    color: rgba(90, 77, 248, 0.9);
}

/* ==================== 富文本编辑器 ==================== */
.input-textarea{
    border: solid 1px #ddd;
    background-color: var(--main-bg);
    min-width: 100%;
    max-width: 100%;
    width: 100%;
    min-height: 400px;
    line-height: 30px;
    padding: 6px 12px;
    border-radius: 7px;
    font-family: var(--font-simple);
    outline: none;
    font-size: 15px;
    resize: none;
}

.input-textarea:focus {
    border-color: #5a4df8;
    background-color: #f8f7fd;
    box-shadow: inset 0 1px 4px rgba(90, 77, 248, 0.2), 0 0 0 2px rgba(90, 77, 248, 0.1);
}

/* ==================== Tab切换滑动效果 ==================== */
.tab-wrapper {
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
}

.sql-tab {
    position: relative;
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: var(--main-bg);
    border: solid 1px #ddd;
    border-radius: 7px;
    overflow: hidden;
    width: 100%;
}

.sql-tab li {
    flex: 1;
    text-align: center;
    padding: 0.5em 0;
    margin-bottom: 0;
    cursor: pointer;
    font-size: 15px;
    user-select: none;
    transition: color 0.3s ease;
    z-index: 2;
}

/* 高亮文字 */
.sql-tab li.active {
    color: #fff;
    z-index: 3;
}

/* 可滑动的高亮层 */
.sql-tab .tab-highlight {
    position: absolute;
    top: 0;
    left: 0;
    width: 33.33%;
    height: 100%;
    background-color: rgb(93 79 248 / 90%);
    border-radius: 7px;
    pointer-events: none; /* 不阻挡点击事件 */
    z-index: 1;

    /* 关键：非匀速动画！*/
    transition:
            left 0.48s cubic-bezier(0.65, -0.4, 0.35, 1.4),
            width 0.48s cubic-bezier(0.65, -0.4, 0.35, 1.4);
}

/* ==================== 关键：松手后整体弹出动画 ==================== */

@keyframes popIn {
    0%   { transform: scale(0); }
    60%  { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* 同时给外圈和内点添加动画 */
.size-item.pop-animation::before,
.size-item.pop-animation::after {
    animation: popIn 0.3s cubic-bezier(0.25, 0.1, 0.75, 1) forwards;
}

@media (max-width: 768px) {
    .tool-content {
        padding: .8em !important;
        box-shadow: unset;
    }

    .operate-buttons .btn {
        line-height: 32px !important;
        height: 32px !important;
        padding: 0 8px !important;
    }

    .tool-content .mobile-item label span {
        height: 16px !important;
        padding: 0 4px !important;
        margin: 0 2px !important;
        font-size: 12px !important;
    }

    .code-upload{
        min-height: 200px;
        padding: 10px;
    }

    .code-upload img{
        max-width: 100%;
    }

    #previewContainer{
        padding:0;
    }

    .upload-prompt>svg{
        width: 50px;
        height: 50px;
    }

    .upload-prompt p{
        text-align: center;
    }

    .btn{
        height: 32px;
    }

    .input-number{
        height: 32px;
        line-height: 32px;
    }

    .sql-tab li{
        font-size: 13px;
    }

    .input-textarea{
        min-height: 200px;
    }

}