.tool-content {
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    padding: 1.2em;
    border-radius: .6em;
    position: relative;
}

.tool-content .item-converter {
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-family: var(--font-simple);
}

.tool-content .item-converter > label {
    display: block;
}

.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-purple {
    color: #fff;
    background-color: rgb(93 79 248 / 95%);
    border-color: var(--primary-color);
}

.btn-purple svg {
    fill: #fff;
}

.btn-green {
    color: #fff;
    background-color: rgba(34, 197, 94, 0.95);
    border-color: #22c55e;
}

.btn-green svg {
    fill: #fff;
}

.item-result{
    padding: 12px;
    border-radius: 7px;
    margin-top: 1.2em;
    font-weight: bold;
    border: solid 1px #ddd;
}

/* 关键动画：扩散 + 淡出 */
@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: 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;
}

/* 拖拽时高亮 */
.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;
}

#previewContainer{
    padding: 20px 10px;
}

.image-upload img {
    max-width: 80%;
    max-height: 600px;
    background: url("../images/transparent.png") repeat;
    background-size: 20px;
    margin: auto;
}

@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: 200px;
        padding: 10px;
    }

    .image-upload img{
        max-width: 100%;
    }

    #previewContainer{
        padding:0;
    }

    .upload-prompt>svg{
        width: 50px;
        height: 50px;
    }

    .upload-prompt p{
        text-align: center;
    }

    .btn{
        height: 32px;
    }
}