.tool-content {
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    padding: 1.2em;
    border-radius: .6em;
    position: relative;
    margin-bottom: 1.2em;
}

.tool-content .item-tool {
    display: flex;
    flex-direction: column;
    gap: 1.2em;
    font-family: var(--font-simple);
}

.tool-content .item-tool .image-upload {
    border: solid 1px #ddd;
    background-color: var(--main-bg);
    width: 100%;
    height: 500px;
    padding: 15px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tool-content .item-tool .image-upload img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain; /* 关键属性 */
    width: auto;
    height: auto;
}

/*滤镜类型*/
.tool-content .item-type {
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    flex-direction: row;
    margin-top: 1.2em;
    gap: 0.6em;
    padding-bottom: 1.2em;
    border-bottom: solid 1px #eaeaea;
}

.tool-content .item-type li {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    line-height: unset;
    padding: 0 15px;
    font-size: 14px;
    color: #6659ff;
    border: 1px solid #e1deff;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-simple);
    margin-bottom: 0;
    user-select: none;
}

.tool-content .item-type li.active, .tool-content .item-type li:hover {
    background-color: #6e60ff;
    border-color: #6e60ff;
    color: #fff;
}

/*按钮样式*/
.tool-content .operate-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1.2em;
}

.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 svg {
    fill: #fff;
}

.btn-purple {
    color: #fff;
    background-color: rgb(93 79 248 / 95%);
    border-color: var(--primary-color);
}

.btn-green {
    color: #fff;
    background-color: rgba(34, 197, 94, 0.95);
    border-color: #22c55e;
}

.btn-green svg {
    width: 1.1em;
    height: 1.1em;
}

/* 关键动画：扩散 + 淡出 */
@keyframes ripple-effect {
    0% {
        width: 0;
        height: 0;
        opacity: 0.4;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .tool-content .item-tool .image-upload{
        height: auto;
        border-width: 0;
        background-color: transparent;
        padding: 0;
        border-radius: 0;
    }

    .tool-content .item-type li{
        height: 32px;
        font-size: 13px;
        padding: 0 12px;
    }
}