.tool-content {
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    padding: 1.2em;
    border-radius: .6em;
    position: relative;
}

.tool-content .item-incision {
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-family: var(--font-simple);
}

.tool-content .item-incision > label {
    display: block;
}

.tool-content .item-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.2em 1.6em;
    flex-direction: row;
    margin: 1.2em 0;
    border-bottom: solid 1px #ddd;
    padding-bottom: 1.2em;
}

.tool-content .item-filter .item-group {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* 直接用，全浏览器生效 */
.tool-content .item-filter .item-group input[type="color"] {
    width: 100px;
    height: 34px;
    cursor: pointer;
    padding: 2.5px;
    border: solid 1px #ddd;
}

/* 去掉默认边框 */
.tool-content .item-filter .item-group input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.tool-content .item-filter .item-group input[type="color"]::-webkit-color-swatch {
    border: none;
}

/* 滑块整体 */
input[type="range"] {
    height: 8px;
    background: linear-gradient(#2287fa, #2287fa) 0/30% 100% no-repeat #eee;
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
}

/* 滑块小圆点 Chrome/Edge */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #2287fa;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* 火狐兼容 */
input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #2287fa;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

input[type="range"]::-moz-range-track {
    height: 6px;
    background: #eee;
    border-radius: 5px;
}

.tool-content .item-filter .item-group span {
    padding-left: 10px;
    min-width: 37px;
}

/*按钮样式*/
.tool-content .operate-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.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-purple {
    color: #fff;
    background-color: rgb(93 79 248 / 95%);
    border-color: rgb(93 79 248 / 95%);
}

.btn-red {
    color: #fff;
    background-color: rgb(242 55 55 / 95%);
    border-color: rgb(242 55 55 / 95%);
}

.btn-green {
    color: #fff;
    background-color: rgba(34, 197, 94, 0.95);
    border-color: rgba(34, 197, 94, 0.95);
}

/* 图片预览 */
.item-result {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 1.2em;
}

.item-result > div {
    width: calc(50% - 5px);
}

.item-result > div .image-tit{
    margin-bottom: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-result > div .image-con{
    border: 2px dashed #ccc;
    max-width: 100%;
    height: auto;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 关键动画：扩散 + 淡出 */
@keyframes ripple-effect {
    0% {
        width: 0;
        height: 0;
        opacity: 0.4;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* ==================== 图片上传框 ==================== */
.image-upload {
    border: solid 1px #ddd;
    background-color: var(--main-bg);
    min-width: 100%;
    max-width: 100%;
    width: 100%;
    min-height: 250px;
    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;
}

/* 拖拽时高亮 */
.image-upload.dragover {
    border-color: #5a4df8;
    background-color: #f0edff;
    color: #5a4df8;
}

.image-upload .upload-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px 0;
}

@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;
    }


    .image-upload {
        min-height: 180px;
        padding: 10px;
    }

    .image-upload img {
        max-width: 100%;
    }

    .upload-prompt > svg {
        width: 50px;
        height: 50px;
    }

    .upload-prompt p {
        text-align: center;
    }
}