/* 自定义弹窗容器 */
.custom-alert-container {
    position: fixed; /* 关键：固定定位，使其脱离文档流 */
    top: 20px;       /* 距离顶部 20px */
    left: 50%;       /* 距离左边 50% */
    transform: translateX(-50%); /* 关键：向左移动自身宽度的50%，实现水平居中 */
    z-index: 9999;

    /* 以下属性用于居中和排列 */
    display: flex;
    flex-direction: column; /* 垂直排列弹窗 */
    align-items: center;    /* 水平居中每个弹窗 */

    /* 可选：为了让容器宽度不影响子元素居中，可以设置一个最大宽度 */
    max-width: 90%;
}

/* 移除 .custom-alert 上的定位属性，让它正常显示 */
.custom-alert {
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(0);
    transition: transform 0.3s ease-in-out;
    margin-bottom: 10px;
    pointer-events: auto;
    width: 300px; /* 固定弹窗宽度，使其在 flexbox 中有固定大小 */
}

.custom-alert.success {
    background: linear-gradient(45deg, #4CAF50, #8BC34A);
    border-left: 5px solid #4CAF50;
}

.custom-alert.error {
    background: linear-gradient(45deg, #f44336, #ff9800);
    border-left: 5px solid #f44336;
}

.custom-alert.slide-out {
    transform: translateX(120%);
}
