.tool-content {
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    padding: 1.2em;
    border-radius: .6em;
    position: relative;
}

.tool-content .item-tool {
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-family: var(--font-simple);
}

.waveform-container {
    width: 100%;
    background-color: #f1f5f9;
    border-radius: 7px;
    margin-top: 1.2em;
    position: relative;
    overflow: hidden;
    cursor: pointer; /* 提示可点击 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 波形画布容器：高度145px，精准匹配要求 */
#waveform {
    width: 100%;
    height: 145px; /* 波形高度设置为145px */
}

/* 播放进度条样式 - 适配新高度 */
.progress-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background-color: #ff4444;
    pointer-events: none;
    z-index: 10;
}

/* 进度条拖动时的半透明遮罩 - 适配新高度 */
.progress-mask {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: rgba(66, 133, 244, 0.05);
    pointer-events: none;
    z-index: 5;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #555;
    font-size: 14px;
}

input[type="range"] {
    cursor: pointer;
    background-color: rgb(229 231 235);
    height: 9px;
    border-radius: 10px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgb(93 79 248 / 95%);
    cursor: pointer;
    box-shadow: 0 2px 4px #0003;
}

select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-size: 14px;
}

.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: 38px;
    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%);
    padding: 0 18px;
    letter-spacing: 1px;
    margin-left: auto;
}

.controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 1.2em;
}

.play-btn {
    background: #3b82f6;
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.controls .volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.controls .volume-control .volume-slider {
    flex: 1;
    height: 7px;
    -webkit-appearance: none;
    background: #e2e8f0;
    border-radius: 4px;
    outline: none;
}

.custom-select {
    position: relative;
    display: flex;
}

.custom-select button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 8px;
    height: 38px;
    gap: 0 6px;
    box-shadow: none;
    width: 90px;
}

.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;
}

.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;
}

/* 关键动画：扩散 + 淡出 */
@keyframes ripple-effect {
    0% {
        width: 0;
        height: 0;
        opacity: 0.4;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* ==================== 图片上传框 ==================== */
.image-upload {
    border: dashed 2px #e5e7eb;
    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:hover {
    border-color: #5d69ff;
}

/* 拖拽时高亮 */
.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;
    }

    .btn-purple{
        margin-left: unset;
    }

    .custom-select button{
        width: 60px;
        height: 32px;
    }

    .btn{
        height: 32px;
    }

    input[type="range"]{
        width: 70px;
    }

    .controls{
        gap: 10px;
        justify-content: center;
    }
}