/* Toast 提示样式 */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 16px;
    pointer-events: none;
}

.toast-item {
    min-width: 380px;
    max-width: 500px;
    padding: 20px 24px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 16px;
    pointer-events: auto;
    animation: toastSlideIn 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.toast-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: #ddd;
}

.toast-item.success::before {
    background: #5BBB7B;
}

.toast-item.error::before {
    background: #ef4444;
}

.toast-item.warning::before {
    background: #f59e0b;
}

.toast-item.info::before {
    background: #3b82f6;
}

.toast-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
}

.toast-item.success .toast-icon {
    background: rgba(91, 187, 123, 0.1);
    color: #5BBB7B;
}

.toast-item.error .toast-icon {
    background: #fee2e2;
    color: #ef4444;
}

.toast-item.warning .toast-icon {
    background: #fef3c7;
    color: #f59e0b;
}

.toast-item.info .toast-icon {
    background: #dbeafe;
    color: #3b82f6;
}

.toast-content {
    flex: 1;
    font-size: 18px;
    line-height: 1.6;
    color: #1f2937;
    font-weight: 500;
}

.toast-close {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
    border-radius: 4px;
}

.toast-close:hover {
    color: #374151;
    background: #f3f4f6;
}

.toast-item.hiding {
    animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 移动端适配 */
@media (max-width: 767.98px) {
    #toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .toast-item {
        min-width: auto;
        max-width: 100%;
        padding: 18px 20px;
        gap: 14px;
    }

    .toast-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .toast-content {
        font-size: 16px;
        line-height: 1.5;
    }

    .toast-close {
        width: 26px;
        height: 26px;
        font-size: 22px;
    }

    .toast-item::before {
        width: 5px;
    }
}

/* 小屏手机适配 */
@media (max-width: 480px) {
    #toast-container {
        top: 8px;
        right: 8px;
        left: 8px;
        gap: 12px;
    }

    .toast-item {
        padding: 16px 18px;
        border-radius: 12px;
    }

    .toast-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .toast-content {
        font-size: 15px;
    }
}





