.custom-toast {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    max-width: 80%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 24px;
    line-height: 1.5;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
}

/* 位置样式 */
.custom-toast.top {
    top: 20%;
}

.custom-toast.middle {
    top: 50%;
    transform: translate(-50%, -50%);
}

.custom-toast.bottom {
    bottom: 20%;
}

/* 动画样式 */
.custom-toast.fade-in {
    -webkit-animation: toastFadeIn 0.3s ease;
    animation: toastFadeIn 0.3s ease;
}

.custom-toast.fade-out {
    -webkit-animation: toastFadeOut 0.3s ease forwards;
    animation: toastFadeOut 0.3s ease forwards;
}

/* 图标样式 */
.custom-toast .icon-success {
    width: 16px;
    height: 16px;
    background: url('../img/icon-success.png') no-repeat center/contain;
}

.custom-toast .icon-fail {
    width: 16px;
    height: 16px;
    background: url('../img/icon-fail.png') no-repeat center/contain;
}

/* 动画关键帧 */
@keyframes toastFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes toastFadeOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
}