.tool-content {
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    padding: 1.2em;
    border-radius: .6em;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.2em;
}

.tool-content .item-file {
    display: flex;
    flex-direction: column;
    gap: 15px;
    cursor: pointer;
}

.tool-content .item-filter {
    padding: 1em;
    border-radius: 7px;
    border: solid 1px #ddd;
    background-color: var(--main-bg);
    display: flex;
    flex-wrap: wrap;
    gap: 0.8em;
}

.tool-content .item-filter .options {
    display: flex;
    justify-content: flex-start;
    flex-direction: column;
    gap: 0.3em;
    width: calc(50% - 0.4em);
}

.tool-content .item-filter .text-options{
    display: none;
}

.tool-content .item-filter .options .image-picker{
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 10px;
}

.tool-content .item-filter .options > label {
    padding-left: 2px;
    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: 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);
}

.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%);
}

.file-preview{
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 7px;
    width: 100%;
    padding: 12px;
}

.file-preview .file-name{
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
}

.file-preview .file-meta{
    margin-top: 5px;
    font-size: 13px;
    color: #6b7280;
}

.convert-status-waiting {
    color: #fff;
    font-size: 12px;
    background: #666;
    border-radius: 13px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
}

.convert-status-doing {
    color: #fff;
    font-size: 12px;
    background: #eb5352;
    border-radius: 13px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
}

.convert-status-success {
    color: #fff;
    font-size: 12px;
    background: #0aa866;
    border-radius: 13px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
}

.file-name span:nth-child(2) {
    margin-right: auto;
}

/* 关键动画：扩散 + 淡出 */
@keyframes ripple-effect {
    0% {
        width: 0;
        height: 0;
        opacity: 0.4;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* 文件样式 */
.file-upload {
    border: solid 1px #ddd;
    background-color: var(--main-bg);
    width: 100%;
    min-height: 240px;
    line-height: 30px;
    padding: 0 12px;
    border-radius: 7px;
    outline: none;
    font-size: 15px;
    color: #6c6c6c;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px 0;
    position: relative;
}

/* 拖拽时高亮 */
.file-upload.dragover {
    border-color: #5a4df8;
    background-color: #f0edff;
    color: #5a4df8;
}

/* 上传信息模块 */
.file-upload .upload-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px 0;
    width: 100%;
    height: 100%;
}

.file-upload .upload-prompt > div > p {
    text-align: center;
    margin-bottom: 0;
}

.item-result{
    display: none;
    align-items: stretch;
    gap: 1em;
}


.tool-content .item-filter .options .custom-select {
    position: relative;
}

/*下拉框*/
.tool-content .item-filter .options .custom-select button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 8px;
    gap: 0 6px;
    width: 100%;
    height: 38px;
    box-shadow: unset;
}

.tool-content .item-filter .options .select-dropdown[hidden] {
    display: none;
}

.tool-content .item-filter .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;
}

@media (max-width: 768px) {
    .tool-content {
        padding: .8em;
        box-shadow: unset;
        gap: 0.8em;
    }

    .file-upload {
        min-height: 200px;
    }

    .tool-content .item-filter{
        flex-direction: column;
    }

    .item-result{
        flex-direction: column;
        gap: 0.8em;
    }

    .item-result .item-video, .item-result .item-audio{
        width: 100%;
    }

    .video-wrap video {
        max-height: 300px;
    }
}

/* ========== 视频倍速转换：结果预览与下载按钮 ========== */
.btn-red {
    color: #fff;
    background-color: #eb5352;
    border-color: #eb5352;
}

.btn-red:hover {
    background-color: #d94544;
    border-color: #d94544;
}

.video-wrap {
    position: relative;
    width: 100%;
    min-height: 220px;
    background: #0f1115;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.video-wrap video {
    display: block;
    width: 100%;
    max-height: 480px;
    background: #000;
    object-fit: contain;
}

.video-wrap .badge {
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
    position: absolute;
    left: 12px;
    top: 12px;
    background: rgb(59 62 71 / 70%);
    color: #fff;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 7px;
    backdrop-filter: blur(6px);
}

/* 上传区在拖拽时避免 svg 抢走点击事件 */
.file-upload .upload-prompt svg {
    pointer-events: none;
}

@media (max-width: 768px) {
    .tool-content .item-filter .options{
        width: 100%;
    }
}