/* Toast 样式 */
.toast-container {
    position: fixed;
    top: 100px; /* 离底部的距离 */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.toast {
    min-width: 250px;
    padding: 15px;
    margin: 10px;
    border-radius: 5px;
    color: white;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    transform: translateY(50px); /* 初始时设置 Toast 位于底部之外 */
}

/* 成功信息的样式 */
.toast.success {
    background-color: #4CAF50; /* 绿色 */
}

/* 错误信息的样式 */
.toast.error {
    background-color: #f44336; /* 红色 */
}

/* Toast 显示的样式 */
.toast.show {
    opacity: 1;
    transform: translateY(0); /* 显示时从底部滑入 */
}

/* 手机端适配 */
@media (max-width: 768px) {
    .toast-container {
        left: 16px;
        right: 16px;
        top: auto;
        bottom: max(24px, env(safe-area-inset-bottom));
        transform: none;
        width: auto;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        pointer-events: none;
    }

    .toast-container > * {
        pointer-events: auto;
    }

    .toast {
        min-width: 0;
        width: 100%;
        max-width: 100%;
        margin: 6px 0;
        padding: 14px 16px;
        font-size: 15px;
        line-height: 1.4;
        border-radius: 10px;
        box-sizing: border-box;
    }

    .toast.show {
        transform: translateY(0);
    }
}