/* ============================================================
   全局 Toast 报错提醒 — 深色玻璃卡片，任何背景下都清晰可读
   ============================================================ */
#toastContainer {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 14px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    width: min(92vw, 440px);
    max-height: 80vh;
    overflow: visible;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(22, 20, 32, 0.94);
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
    font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-left: 4px solid #888;
    pointer-events: auto;
    animation: toastIn .25s ease;
    max-width: 100%;
    word-break: break-word;
}
.toast .toast-icon {
    font-size: 18px;
    line-height: 1.35;
    flex: 0 0 auto;
}
.toast .toast-msg {
    flex: 1;
    min-width: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.toast .toast-close {
    flex: 0 0 auto;
    cursor: pointer;
    opacity: .55;
    border: none;
    background: none;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    padding: 0 2px;
}
.toast .toast-close:hover { opacity: 1; }

.toast.toast-error   { border-left-color: #EF4444; }
.toast.toast-error   .toast-icon { color: #EF4444; }
.toast.toast-success { border-left-color: #34D399; }
.toast.toast-success .toast-icon { color: #34D399; }
.toast.toast-warn    { border-left-color: #F4C430; }
.toast.toast-warn    .toast-icon { color: #F4C430; }
.toast.toast-info    { border-left-color: #4A90D9; }
.toast.toast-info    .toast-icon { color: #4A90D9; }

.toast.hide { animation: toastOut .25s ease forwards; }

@keyframes toastIn  { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to   { opacity: 0; transform: translateY(-12px); } }
