#zg-toast-root {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2147483600 !important;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: max(16px, env(safe-area-inset-top)) 16px 0;
    gap: 8px;
}

.zg-toast {
    box-sizing: border-box;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
    padding: 13px 18px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    line-height: 26px;
    color: #fff;
    box-shadow: 0 10px 32px rgba(20, 25, 35, 0.22);
    opacity: 0;
    transform: translateY(-16px) scale(0.95);
    transition: opacity 0.3s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    max-width: min(440px, calc(100vw - 32px));
    max-height: min(220px, 40dvh);
    overflow: auto;
    text-align: left;
    backdrop-filter: saturate(1.15) blur(12px);
    pointer-events: auto;
    cursor: pointer;
}

.zg-toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.zg-toast-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.97), rgba(4, 120, 87, 0.97));
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 10px 32px rgba(16, 185, 129, 0.28);
}

.zg-toast-error {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.97), rgba(220, 38, 38, 0.97));
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: 0 12px 36px rgba(220, 38, 38, 0.32);
}

.zg-toast-error.show {
    animation: zg-toast-shake 0.42s ease;
}

.zg-toast-info {
    background: linear-gradient(135deg, rgba(91, 140, 255, 0.97), rgba(58, 116, 255, 0.97));
    border: 1px solid rgba(255, 255, 255, 0.26);
    box-shadow: 0 10px 32px rgba(91, 140, 255, 0.28);
}

.zg-toast-icon {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.24);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.zg-toast-error .zg-toast-icon {
    background: rgba(255, 255, 255, 0.3);
    font-size: 15px;
}

.zg-toast-text {
    flex: 0 1 auto;
    min-width: 0;
    word-break: break-word;
}

@keyframes zg-toast-shake {
    0%, 100% { transform: translateY(0) scale(1); }
    18% { transform: translateY(0) scale(1) translateX(-4px); }
    36% { transform: translateY(0) scale(1) translateX(4px); }
    54% { transform: translateY(0) scale(1) translateX(-3px); }
    72% { transform: translateY(0) scale(1) translateX(3px); }
}
